[libcxx-commits] [libcxx] [libcxxabi] [libcxx][cmake] Allow using FatLTO in libc++ builds (PR #112277)

Paul Kirth via libcxx-commits libcxx-commits at lists.llvm.org
Mon Oct 14 17:53:58 PDT 2024


ilovepi wrote:

> Why cannot we just set `LLVM_ENABLE_FATLTO` in our cache files?

I don't think we want to couple building libc++ with FATLTO to whether you want to build the compiler that way, do we? Isn't how libc++ built orthogonal to the other build options? Once we have a way to spell that in the build, then yes, we should update the cache file, and we'll probably key that off of `LLVM_ENABLE_FATLTO`. 

But even if we do change the spelling to reuse `LLVM_ENABLE_FATLTO`,  I don't understand is why I couldn't meaningfully change the build flags for libc++ by following the example linked above and adding a call to the new function in `cxx_add_common_build_flags()`. The fact that I could only get it to work this way seems wrong, and kind of hacky.





https://github.com/llvm/llvm-project/pull/112277


More information about the libcxx-commits mailing list