Otherwise it doesn't work when building with -DLLVM_ENABLE_LTO=thin
(We hit this in Chromium in https://bugs.chromium.org/p/chromium/issues/detail?id=966403)
Differential D62315
[compiler-rt][crt] Pass -fno-lto in check_cxx_section_exists hans on May 23 2019, 7:16 AM. Authored by
Details Otherwise it doesn't work when building with -DLLVM_ENABLE_LTO=thin (We hit this in Chromium in https://bugs.chromium.org/p/chromium/issues/detail?id=966403)
Diff Detail Event TimelineComment Actions This lgtm, but it suggests there's no upstream bot building llvm with lto, and running tests with it. I'm not sure I want to be in the business of owning test coverage for that config -- should we have an LTO bot on the llvm buildbot master?
Comment Actions As Bob pointed out on the Chromium bug, there is http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu but that doesn't include compiler-rt. It's Sony's bot. I'll ask if they want to include compiler-rt.
|
I believe this should be done on line 79 as append_list_if(COMPILER_RT_HAS_FNO_LTO_FLAG -fno-lto CRT_CFLAGS), try_compile_flags is only used to test whether the compiler supports .init/.fini section but doesn't change flags used to compile crtbegin.o/crtend.o.