diff options
author | Howard Trickey <howard.trickey@gmail.com> | 2020-08-21 00:03:51 +0300 |
---|---|---|
committer | Howard Trickey <howard.trickey@gmail.com> | 2020-08-21 00:03:51 +0300 |
commit | 3b36e2b7817dee8a800f3c4f4b89b7f64da8155b (patch) | |
tree | 62786e141de120bb7765a240ebe7321dfb4007cd /build_files | |
parent | 57c3718447a4b3db92475ecc86a6d793bd839aef (diff) | |
parent | ce0bcd5fbf40b44c515773434bc7187b093fdb53 (diff) |
Merge branch 'master' into newboolean
Diffstat (limited to 'build_files')
-rw-r--r-- | build_files/cmake/platform/platform_unix.cmake | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake index df7feba2752..3a7875ca46c 100644 --- a/build_files/cmake/platform/platform_unix.cmake +++ b/build_files/cmake/platform/platform_unix.cmake @@ -599,6 +599,14 @@ endif() if(CMAKE_COMPILER_IS_GNUCC) set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing") + # `maybe-uninitialized` is unreliable in release builds, but fine in debug builds. + set(GCC_EXTRA_FLAGS_RELEASE "-Wno-maybe-uninitialized") + set(CMAKE_C_FLAGS_RELEASE "${GCC_EXTRA_FLAGS_RELEASE} ${CMAKE_C_FLAGS_RELEASE}") + set(CMAKE_C_FLAGS_RELWITHDEBINFO "${GCC_EXTRA_FLAGS_RELEASE} ${CMAKE_C_FLAGS_RELWITHDEBINFO}") + set(CMAKE_CXX_FLAGS_RELEASE "${GCC_EXTRA_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_RELEASE}") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${GCC_EXTRA_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") + unset(GCC_EXTRA_FLAGS_RELEASE) + if(WITH_LINKER_GOLD) execute_process( COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version |