include(configure.cmake)
-if (NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
- add_compile_options(-Wformat=0)
- add_compile_options(-Wno-unused-value)
-endif()
-
# The HAVE___THREAD set to 1 causes creation of thread local variable with tls_model("initial-exec")
# which is incompatible with usage of the unwind code in a shared library.
add_definitions(-DHAVE___THREAD=0)
# Ensure that the remote and local unwind code can reside in the same binary without name clashing
add_definitions("-Ddwarf_search_unwind_table_int=UNW_OBJ(dwarf_search_unwind_table_int)")
+# Disable warning due to incorrect format specifier in debugging printf via the Debug macro
+add_compile_options(-Wno-format)
+
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
add_compile_options(-Wno-header-guard)
+elseif()
+ add_compile_options(-Wno-unused-value)
endif()
if(CLR_CMAKE_PLATFORM_ARCH_ARM)
# Disable warning due to labs function called on unsigned argument
add_compile_options(-Wno-absolute-value)
endif()
- # Disable warning due to incorrect format specifier in debugging printf via the Debug macro
- add_compile_options(-Wno-format)
# Disable warning for a bug in the libunwind source src/arm/Gtrace.c:529, but not in code that we exercise
add_compile_options(-Wno-implicit-function-declaration)
# Disable warning due to an unused function prel31_read
# We compile code with -std=c99 and the asm keyword is not recognized as it is a gnu extension
add_definitions(-Dasm=__asm__)
elseif(CLR_CMAKE_PLATFORM_ARCH_I386)
- # Disable warning due to incorrect format specifier in debugging printf via the Debug macro
- add_compile_options(-Wno-format)
# Disable warning for a bug in the libunwind source src/x86/Gos-linux.c, but not in code that we exercise
add_compile_options(-Wno-incompatible-pointer-types)
endif()