Skip to content

Commit

Permalink
Conditionally check the compiler flags in libs.native (#109556)
Browse files Browse the repository at this point in the history
Co-authored-by: Adeel Mujahid <[email protected]>
Co-authored-by: Alexander Köplinger <[email protected]>
  • Loading branch information
3 people authored Dec 20, 2024
1 parent 6001638 commit f580364
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/native/libs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,14 @@ if (CLR_CMAKE_TARGET_UNIX OR CLR_CMAKE_TARGET_BROWSER OR CLR_CMAKE_TARGET_WASI)
add_compile_options(-Wno-empty-translation-unit)
add_compile_options(-Wno-cast-align)
add_compile_options(-Wno-typedef-redefinition)
add_compile_options(-Wno-c11-extensions)
add_compile_options(-Wno-pre-c11-compat) # fixes build on Debian
add_compile_options(-Wno-unknown-warning-option) # unknown warning option '-Wno-pre-c11-compat'
add_compile_options(-Wno-thread-safety-analysis)
add_compile_options(-Wno-c11-extensions)

check_c_compiler_flag(-Wpre-c11-compat COMPILER_SUPPORTS_W_PRE_C11_COMPAT)
if (COMPILER_SUPPORTS_W_PRE_C11_COMPAT)
add_compile_options(-Wno-pre-c11-compat)
endif()

if (CLR_CMAKE_TARGET_BROWSER OR CLR_CMAKE_TARGET_WASI)
add_compile_options(-Wno-unsafe-buffer-usage)
add_compile_options(-Wno-cast-function-type-strict)
Expand Down

0 comments on commit f580364

Please sign in to comment.