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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to