nixpkgs/pkgs/servers/foundationdb/patches/suppress-clang-warnings.patch
Austin Seipp 3f1c6801a2
foundationdb: init 6.1.6pre4898_26fbbbf, cmake build
This adds a new build of FoundationDB 6.1, using the new, much improved
with CMake build system with fewer patches and rough edges.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2019-05-15 09:54:10 -05:00

34 lines
1.4 KiB
Diff

commit 8076537a52bb026941f13f5542395aac69ef0825
Author: Austin Seipp <aseipp@pobox.com>
Date: Sat May 4 17:34:51 2019 -0500
cmake: add workarounds for NixOS-specific deficiencies [NixOS]
The NixOS debug builder hook adds '-Wa,--compress-debug-sections' to the
link flags (it actually adds it to the compiler flags, but the compiler
is used for linking, so...). This makes the compiler angry when -Werror
is passed, because it's unused at link-time (-Wa applies to the
assembler). Suppress this warning with -Wno-unused-command-line-argument
NB: we *could* use -Wno-error=unused-command-line-argument, but that
still results in warnings anyway, just not fatal ones. We'd like to
remove them all for the sake of the build output.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
diff --git a/cmake/ConfigureCompiler.cmake b/cmake/ConfigureCompiler.cmake
index 03af9c10..7d059375 100644
--- a/cmake/ConfigureCompiler.cmake
+++ b/cmake/ConfigureCompiler.cmake
@@ -119,6 +119,11 @@ else()
else()
add_compile_options(-Werror)
endif()
+ if (CLANG)
+ # aseipp: NixOS hack
+ add_compile_options(-Wno-unused-command-line-argument)
+ add_link_options(-Wno-unused-command-line-argument)
+ endif()
add_compile_options($<$<BOOL:${GCC}>:-Wno-pragmas>)
add_compile_options(-Wno-error=format
-Wunused-variable