[llvm] [llvm] Disable some LLVM arguments in runtimes mode (PR #73031)

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 21 14:04:19 PST 2023


================
@@ -151,6 +151,9 @@ endif()
 # Avoid checking whether the compiler is working.
 set(LLVM_COMPILER_CHECKED ON)
 
+# This can be used to detect whether we're in the runtimes build.
+set(LLVM_RUNTIMES_BUILD ON)
+
 # Handle common options used by all runtimes.
 include(AddLLVM)
 include(HandleLLVMOptions)
----------------
jhuber6 wrote:

> We could add the `include` in compiler-rt and in libc if we expect those to rely on it perhaps? For libc++, libc++abi and libunwind, I am fairly confident that if we remove it and our CI doesn't break, we're okay. It might break something, but if that's the case and if it's actively being used then we have pretty good systems in place to fix it quickly, and I'm willing to take responsibility to fix it.

The impetus for this was attempting to get math tests working in `libc` for the NVPTX GPU build. The automatic inclusion of `-Wl,` caused the linker to error as Nvidia's linker doesn't support pretty much anything. The other project I'd be interested in is `openmp`, which is a full runtime that statically links a lot of the LLVM libraries. I appreciate the help on this.

https://github.com/llvm/llvm-project/pull/73031


More information about the llvm-commits mailing list