You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LTO doesn't store -mcmodel= information in the bitcode files as it does for many other codegen options and this has to be passed explicitly when invoking linker through the -mllvm -code-model= flag.
The text was updated successfully, but these errors were encountered:
Yes, in Fuchsia on AArch64 -mcmodel=kernel is different from -mcmodel=small, concretely it moves the thread pointer from TPIDR_EL0 to TPIDR_EL1, see https://reviews.llvm.org/D31624. We're trying to enable LTO for our kernel and we hit this issue.
-fPIE (and presumably -fPIC and all the related variants) seems to be in the same boat. But I can't even figure out how to force that with an lld -mllvm option as we do with -mllvm -code-model=kernel. Should we file that as a separate bug or consider it part of this one?
I think it's a general bug if there's anything on the individual TU command line that's lost in LTO so that you can't just use the exact same command lines with the sole addition of -flto for your compile and link steps.
Extended Description
LTO doesn't store -mcmodel= information in the bitcode files as it does for many other codegen options and this has to be passed explicitly when invoking linker through the -mllvm -code-model= flag.
The text was updated successfully, but these errors were encountered: