[PATCH] D38635: Add 'first link flags' for building tests

Brian Cain via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 8 14:22:00 PST 2017


bcain added a comment.

In https://reviews.llvm.org/D38635#917435, @EricWF wrote:

> Are the changes that actually use this feature going to be upstreamed as well? Or are they specific to an internal build? It's never great to introduce seemingly dead or unused code.


I will find out if I can upstream the build configuration that leverages this feature.



================
Comment at: libcxx/utils/libcxx/compiler.py:32
         self.link_flags = list(link_flags or [])
+        self.first_link_flags = []
         self.warning_flags = list(warning_flags or [])
----------------
EricWF wrote:
> If we just need this to pass object files to the link, then I think making it specific to that purpose might be better. IE `link_objects` instead of `first_link_flags`.
The order of the items on the link line is critical and it's important that the items in `first_link_flags` appear before `-lc++ -lc++abi`.  I don't think `link_objects` conveys that same sort of interface/guarantee.  If `first_link_flags` is not clear or generic enough, it could be `before_cxx_libs` or something else more appropriate.


Repository:
  rL LLVM

https://reviews.llvm.org/D38635





More information about the llvm-commits mailing list