if(CMAKE_COMPILER_IS_GNUCXX)
set(warnCXXFLAGS "${warnCXXFLAGS} -Wclobbered -Wno-error=clobbered -Wno-unused-local-typedefs -Wno-error=attributes")
endif()
- if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") # don't care about class that become struct
- set(warnCXXFLAGS "${warnCXXFLAGS} -Wno-mismatched-tags")
+ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ # don't care about class that become struct, avoid issue of empty C structs
+ # size (coming from libunwind.h)
+ set(warnCXXFLAGS "${warnCXXFLAGS} -Wno-mismatched-tags -Wno-extern-c-compat")
endif()
# the one specific to C but refused by C++
src/xbt/log.c src/xbt/xbt_log_appender_file.c
src/xbt/xbt_log_layout_format.c src/xbt/xbt_log_layout_simple.c
src/xbt/dict.cpp src/xbt/dict_elm.c src/xbt/dict_cursor.c
- src/xbt/dynar.cpp src/xbt/fifo.c src/xbt/heap.c src/xbt/swag.c
+ src/xbt/dynar.cpp src/xbt/heap.c src/xbt/swag.c
src/xbt/str.c src/xbt/strbuff.c src/xbt/snprintf.c
src/xbt/queue.c
src/xbt/xbt_os_time.c src/xbt/xbt_os_thread.c
endif()
if(enable_thread_sanitizer)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=thread -fno-omit-frame-pointer")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread -fno-omit-frame-pointer")
- set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -fsanitize=thread")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=thread -fno-omit-frame-pointer -no-pie")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread -fno-omit-frame-pointer -no-pie")
+ set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -fsanitize=thread -no-pie")
endif()
if(enable_undefined_sanitizer)