[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 13:59:14 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:
This change was initially to unblock me on some issues with GPU compilation, but I'm happy to expand the scope if others are in agreement.
There's a handful of clang options we may want to keep to remove some regressions? Here's the set of flags that the `libc` project has right now:
```
-fPIC
-fno-semantic-interposition
-fvisibility-inlines-hidden
-Werror=date-time
-Werror=unguarded-availability-new
-Wall -Wextra
-Wno-unused-parameter
-Wwrite-strings -Wcast-qual
-Wmissing-field-initializers
-Wimplicit-fallthrough
-Wcovered-switch-default
-Wno-noexcept-type
-Wnon-virtual-dtor
-Wdelete-non-virtual-dtor
-Wsuggest-override
-Wstring-conversion
-Wmisleading-indentation
-Wctad-maybe-unsupported
-fdiagnostics-color
-ffunction-sections
-fdata-sections
```
Do any of these look integral? We probably want to keep `-fPIC -ffunction-sections -fdata-sections` if nothing else. Warnings should probably also be somewhat consistent.
https://github.com/llvm/llvm-project/pull/73031
More information about the llvm-commits
mailing list