[PATCH] D42758: Support `#pragma comment(lib, "name")` in the frontend for ELF

2018-02-06 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd closed this revision. compnerd added a comment. SVN r324438 Repository: rC Clang https://reviews.llvm.org/D42758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D42758: Support `#pragma comment(lib, "name")` in the frontend for ELF

2018-02-06 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: docs/LanguageExtensions.rst:2732 + +The ``#pragma comment(lib, ...)`` directive is supported on all ELF targets. +The second parameter is the library name (without the traditional Unix prefix of erichkeane wrote: >

[PATCH] D42758: Support `#pragma comment(lib, "name")` in the frontend for ELF

2018-02-06 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. This revision is now accepted and ready to land. Just 1 format question, otherwise Looks good. Comment at: docs/LanguageExtensions.rst:2732 + +The ``#pragma comment(lib, ...)`` directive is supported on all ELF

[PATCH] D42758: Support `#pragma comment(lib, "name")` in the frontend for ELF

2018-02-06 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 133030. compnerd added a comment. Add additional test, update docs Repository: rC Clang https://reviews.llvm.org/D42758 Files: docs/LanguageExtensions.rst lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h lib/Parse/ParsePragma.cpp

[PATCH] D42758: Support `#pragma comment(lib, "name")` in the frontend for ELF

2018-02-06 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. @jhenderson I believe that the first one is what this is implementing. I believe that adding the last two as a patch following this one is preferable as that is specific to the needs for PS4, but, both of those should be possible to accommodate. I would love to see

[PATCH] D42758: Support `#pragma comment(lib, "name")` in the frontend for ELF

2018-02-06 Thread James Henderson via Phabricator via cfe-commits
jhenderson added a comment. In https://reviews.llvm.org/D42758#997880, @erichkeane wrote: > I'd like to see @probinson s PS4 discussion bottom out, but I don't see any > reason to hold this up otherwise. The PS4 compiler uses its linker options mechanism to communicate three different things

[PATCH] D42758: Support `#pragma comment(lib, "name")` in the frontend for ELF

2018-02-05 Thread David Majnemer via Phabricator via cfe-commits
majnemer added a comment. docs/LanguageExtensions.html should be updated to mention that we support this extension on all ELF targets. Repository: rC Clang https://reviews.llvm.org/D42758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D42758: Support `#pragma comment(lib, "name")` in the frontend for ELF

2018-02-05 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 132853. compnerd added a comment. clang-format missed line, simplify some checks Repository: rC Clang https://reviews.llvm.org/D42758 Files: lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h lib/Parse/ParsePragma.cpp

[PATCH] D42758: Support `#pragma comment(lib, "name")` in the frontend for ELF

2018-02-05 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. This seems pretty OK to me. I'd like to see @probinson s PS4 discussion bottom out, but I don't see any reason to hold this up otherwise. We definitely should leave the format as #pragma comment(keyword, "message"), since there is significant prior art here.

[PATCH] D42758: Support `#pragma comment(lib, "name")` in the frontend for ELF

2018-02-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd marked 2 inline comments as done. compnerd added a comment. @probinson it would be pretty cool if we could get the PS4 environment to share the same linker options implementation. What other options do you guys need for this to be a viable approach? Repository: rC Clang

Re: [PATCH] D42758: Support `#pragma comment(lib, "name")` in the frontend for ELF

2018-02-01 Thread Rui Ueyama via cfe-commits
On Wed, Jan 31, 2018 at 7:23 PM, Paul Robinson via Phabricator < revi...@reviews.llvm.org> wrote: > probinson added a comment. > > In https://reviews.llvm.org/D42758#993936, @ruiu wrote: > > > > I also wonder which is better `#pragma comment(lib, "m")` or `#pragma > comment(lib, "m")`. > > > >

[PATCH] D42758: Support `#pragma comment(lib, "name")` in the frontend for ELF

2018-01-31 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. In https://reviews.llvm.org/D42758#993936, @ruiu wrote: > > I also wonder which is better `#pragma comment(lib, "m")` or `#pragma > > comment(lib, "m")`. > > Sorry, I meant `#pragma comment(lib, "m")` or `#pragma comment("lib", "m")`. I can't swear to it but I don't

[PATCH] D42758: Support `#pragma comment(lib, "name")` in the frontend for ELF

2018-01-31 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added a comment. > I also wonder which is better `#pragma comment(lib, "m")` or `#pragma > comment(lib, "m")`. Sorry, I meant `#pragma comment(lib, "m")` or `#pragma comment("lib", "m")`. Repository: rC Clang https://reviews.llvm.org/D42758

[PATCH] D42758: Support `#pragma comment(lib, "name")` in the frontend for ELF

2018-01-31 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added a comment. `#pragma comment` is what Microsoft is using, but is everybody happy about that name? It isn't clear at least to me that what it actually means is linker directives. I also wonder which is better `#pragma comment(lib, "m")` or `#pragma comment(lib, "m")`. Repository:

[PATCH] D42758: Support `#pragma comment(lib, "name")` in the frontend for ELF

2018-01-31 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 132252. compnerd added a comment. Add missed file Repository: rC Clang https://reviews.llvm.org/D42758 Files: lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h lib/Parse/ParsePragma.cpp test/CodeGen/elf-linker-options.c Index:

[PATCH] D42758: Support `#pragma comment(lib, "name")` in the frontend for ELF

2018-01-31 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision. compnerd added a reviewer: rnk. This adds the frontend support required to support the use of the comment pragma to enable auto linking on ELFish targets. This is a generic ELF extension supported by LLVM. We need to change the handling for the "dependentlib"