Skip to content

Commit 69bce15

Browse files
committed
[clang] Silence some warnings when building clang with external llvm
If you build clang with `builtin_llvm=OFF` you might get flooded with so many warnings that it's unsustainable. This commit suggests to silence these kind of warnings. Note that there are still some warnings left, but not to the point that the output is completely flooding. This is an upstreamed patch of what is done for nikpkgs: https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/science/misc/root/default.nix#L200
1 parent c97ec17 commit 69bce15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

interpreter/llvm-project/clang/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
310310

311311
# Enable -pedantic for Clang even if it's not enabled for LLVM.
312312
if (NOT LLVM_ENABLE_PEDANTIC)
313-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wno-long-long")
313+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wno-long-long -Wno-shadow -Wno-maybe-uninitialized")
314314
endif ()
315315

316316
check_cxx_compiler_flag("-Werror -Wnested-anon-types" CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG)

0 commit comments

Comments
 (0)