[PATCH] D62315: [compiler-rt][crt] Pass -fno-lto in check_cxx_section_exists

Hans Wennborg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 21 05:23:08 PDT 2019


hans marked an inline comment as done.
hans added inline comments.


================
Comment at: compiler-rt/lib/crt/CMakeLists.txt:22
   endif()
+  append_list_if(COMPILER_RT_HAS_FNO_LTO_FLAG -fno-lto try_compile_flags)
 
----------------
hans wrote:
> phosek wrote:
> > 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`.
> We're already building crtbegin.o/crtend.o with -fno-lto -- I think it gets appended to all runtime build targets at some point.
> 
> It's really the "check whether .init/.fini is support" part I'm going after here, because that doesn't build with the normal compiler-rt flags, and so it doesn't work in thin-lto builds.
Ping?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62315/new/

https://reviews.llvm.org/D62315





More information about the llvm-commits mailing list