File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -328,7 +328,14 @@ if (FLANG_ENABLE_WERROR)
328
328
if ( LLVM_COMPILER_IS_GCC_COMPATIBLE )
329
329
append ("-Werror" CMAKE_C_FLAGS CMAKE_CXX_FLAGS )
330
330
append ("-Wno-error" CMAKE_REQUIRED_FLAGS )
331
- append ("-Wno-maybe-uninitialized" CMAKE_CXX_FLAGS )
331
+
332
+ # This is workaround for GCC 9.3.0 for an issue described in
333
+ # https://github.com/flang-compiler/f18-llvm-project/pull/1130
334
+ check_cxx_compiler_flag ("-Wno-maybe-uninitialized" CXX_SUPPORTS_MAYBE_UNITIALIZED_FLAG )
335
+ if (CXX_SUPPORTS_MAYBE_UNITIALIZED_FLAG )
336
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-maybe-uninitialized" )
337
+ endif ()
338
+
332
339
endif ( LLVM_COMPILER_IS_GCC_COMPATIBLE )
333
340
if (NOT LLVM_ENABLE_WERROR )
334
341
message (WARNING "FLANG_ENABLE_WERROR setting is different from LLVM_ENABLE_WERROR." )
You can’t perform that action at this time.
0 commit comments