[PATCH] D62279: Use LTO capable linker

Chris Bieneman via cfe-commits cfe-commits at lists.llvm.org
Thu May 23 14:57:57 PDT 2019



> On May 23, 2019, at 2:40 PM, Wink Saville via Phabricator <reviews at reviews.llvm.org> wrote:
> 
> winksaville added a comment.
> 
> In D62279#1514596 <https://reviews.llvm.org/D62279#1514596>, @beanz wrote:
> 
>> @winksaville I've figured out how to resolve the `gtest` issue, but unfortunately that isn't good enough to get the `check-runtimes` target working. A change went in back in February (rL353601 <https://reviews.llvm.org/rL353601>), which breaks running compiler-rt's tests when building a distribution in non-trivial ways, which will unfortunately be difficult to resolve.
>> 
>> I will land the `gtest` fix sometime today, and I'm going to start working toward getting the larger issue resolved, although that is going to take some time.
> 
> 
> @beanz, glad we're making progress!
> 
> One other thing, my next goal, after we can successfully build and test the `DistributionExample`,
> is to make `DistributionExample_shared`.  I envision this creating `clang` that is dynamically linked
> to `libclang_shared.so` and `libLLVM.so` and also provide the corresponding static libraries. Doing
> this should provide Evangelos Foutras, whose is the maintainer of the llvm packages at Arch Linux,
> an "easier" path to creating llvm Arch Linux packages that don't use BUILD_SHARED_LIBS.
> 
> Is this a reasonable goal and could `DistrubutionExample_shared` be added along side `DistributionExample`?

The difference between the two is going to be very small, really only 3 options. It is actually probably easier to make it an option that the DistributionExample cache file interprets.

It occurred to me that there is a problem with the way libclang_shared works right now that needs to be resolved before an option to link against it can be added. The issue stems from the fact that some of the larger clang-based tools (like clang-fuzzer) use `add_clang_library` for building their components.

The way I generated the list of components to include in libclang_shared was by making `add_clang_library` construct a global property list that libclang_shared can read the components from. This unfortunately ends up with the list being longer than it should be.

I can probably carve out some time to start working on all of that over the weekend.

-Chris

> 
> 
> Repository:
>  rG LLVM Github Monorepo
> 
> CHANGES SINCE LAST ACTION
>  https://reviews.llvm.org/D62279/new/
> 
> https://reviews.llvm.org/D62279
> 
> 
> 



More information about the cfe-commits mailing list