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)
328328 if ( LLVM_COMPILER_IS_GCC_COMPATIBLE )
329329 append ("-Werror" CMAKE_C_FLAGS CMAKE_CXX_FLAGS )
330330 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+
332339 endif ( LLVM_COMPILER_IS_GCC_COMPATIBLE )
333340 if (NOT LLVM_ENABLE_WERROR)
334341 message (WARNING "FLANG_ENABLE_WERROR setting is different from LLVM_ENABLE_WERROR." )
You can’t perform that action at this time.
0 commit comments