[PATCH] D25932: Unconditionally pass `-lto_library` to the linker on Darwin

Mehdi AMINI via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 21 14:07:05 PST 2016

mehdi_amini added a comment.

We ship `clang + libLTO + ld64` bundled in the toolchain, so even if you don't package libLTO yourself, it is already accessible from the linker: it will use the one in the toolchain when needed.

I don't have an immediate idea to prevent this and have the linker issue an error (other than removing manually libLTO from the Xcode installation).

This is the motivation behind the warning I believe: we're trying to prevent this situation where a user would have clang but not his own libLTO and may encounter an unexpected issue. Even when the user does not opt-in to build his own project with LTO enabled, there can be static archive dependencies that contain bitcode.



More information about the cfe-commits mailing list