File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -126,10 +126,14 @@ if (CLR_CMAKE_TARGET_UNIX OR CLR_CMAKE_TARGET_BROWSER OR CLR_CMAKE_TARGET_WASI)
126126        add_compile_options (-Wno-empty-translation-unit)
127127        add_compile_options (-Wno-cast-align)
128128        add_compile_options (-Wno-typedef-redefinition)
129-         add_compile_options (-Wno-c11-extensions)
130-         add_compile_options (-Wno-pre-c11-compat) # fixes build on Debian 
131-         add_compile_options (-Wno-unknown-warning-option) # unknown warning option '-Wno-pre-c11-compat' 
132129        add_compile_options (-Wno-thread-safety-analysis)
130+         add_compile_options (-Wno-c11-extensions)
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        if  (CLR_CMAKE_TARGET_BROWSER OR  CLR_CMAKE_TARGET_WASI)
134138            add_compile_options (-Wno-unsafe-buffer-usage)
135139            add_compile_options (-Wno-cast-function-type -strict)
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments