File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -128,8 +128,12 @@ if (CLR_CMAKE_TARGET_UNIX OR CLR_CMAKE_TARGET_BROWSER OR CLR_CMAKE_TARGET_WASI)
128128 add_compile_options (-Wno-cast-align)
129129 add_compile_options (-Wno-typedef-redefinition)
130130 add_compile_options (-Wno-c11-extensions)
131- add_compile_options (-Wno-pre-c11-compat) # fixes build on Debian
132- add_compile_options (-Wno-unknown-warning-option) # unknown warning option '-Wno-pre-c11-compat'
131+
132+ check_c_compiler_flag(-Wpre-c11-compat COMPILER_SUPPORTS_W_PRE_C11_COMPAT)
133+ if (COMPILER_SUPPORTS_W_PRE_C11_COMPAT)
134+ add_compile_options (-Wno-pre-c11-compat)
135+ endif ()
136+
133137 add_compile_options (-Wno-thread-safety-analysis)
134138 if (CLR_CMAKE_TARGET_BROWSER)
135139 add_compile_options (-Wno-unsafe-buffer-usage)
You can’t perform that action at this time.
0 commit comments