[libcxx-commits] [clang] [libcxx] [libcxxabi] [Fuchsia][cmake] Allow using FatLTO when building runtimes (PR #112277)
Paul Kirth via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Nov 1 10:44:43 PDT 2024
ilovepi wrote:
I'm pretty sure you're correct on the root cause. In this case its the `pragma`s in libcxx (random and chrono), but I'd expect this to happen for similar situations, like the atomics.
This happens for LTO alone, and isn't something I think we can work around through FatLTO, unless we disable using LTO to link libcxxabi (eg. --no-fat-lto-objects). Since I don't think this is a libcxxabi specific problem, I'm not sure that's necessarily a good idea, and won't just break somewhere else (either in the toolchain build or when building Fuchsia code).
Unsurprisingly, adding `-lzircon` allows the link to complete w/ LTO, so I wonder if there is a way to specify the zircon dep other than through the pragma? This is definitely unsatisfying. I'm tempted to say that clang's Fuchsia driver should just add zircon as a dep, except that feels all kinds of wrong, and is clearly just addressing a symptom instead of the underlying problem.
https://github.com/llvm/llvm-project/issues/56070 has enough to say about why this is hard to fix in LLD/generally, but IDK how to solve this for our usecase ATM. @mysterymath I recall you mentioned a new libcall mechanism that was being used that may help w/ some of deplibs mess. Do you have any thoughts on if that can be adapted in some way to help resolve these?
https://github.com/llvm/llvm-project/pull/112277
More information about the libcxx-commits
mailing list