From 5ed0b29cb6e1f748cd56939a51ba332d6d3047e8 Mon Sep 17 00:00:00 2001 From: Justin Smith Date: Tue, 30 Apr 2024 18:19:48 -0400 Subject: [PATCH] Fix CFI build --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d835f44dd5..c738f7b6e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -354,7 +354,8 @@ if(GCC OR CLANG) set(C_CXX_FLAGS "${C_CXX_FLAGS} -W3 -Wno-unused-parameter -fmsc-version=1900 -Werror") set(C_CXX_FLAGS "${C_CXX_FLAGS} -Wno-deprecated-declarations") else() - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -Wall -Wextra -Wno-unused-parameter -Werror") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wextra -Wno-unused-parameter -Werror") + set(C_CXX_FLAGS "${C_CXX_FLAGS} -Wall -fvisibility=hidden -fno-common") endif() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wwrite-strings -Wformat-security -Wunused-result")