File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -41,16 +41,18 @@ endif()
4141
4242# C++ code in the runtime and standard library should generally avoid
4343# introducing static constructors or destructors.
44- check_cxx_compiler_flag("-Werror -Wglobal -constructors" CXX_SUPPORTS_GLOBAL_CONSTRUCTORS_WARNING)
44+ check_cxx_compiler_flag("-Wglobal-constructors -Werror=global -constructors" CXX_SUPPORTS_GLOBAL_CONSTRUCTORS_WARNING)
4545if (CXX_SUPPORTS_GLOBAL_CONSTRUCTORS_WARNING)
46- list (APPEND SWIFT_RUNTIME_CORE_CXX_FLAGS "-Wglobal-constructors" )
46+ list (APPEND SWIFT_RUNTIME_CORE_CXX_FLAGS "-Wglobal-constructors"
47+ "-Werror=global-constructors" )
4748endif ()
4849
4950# C++ code in the runtime and standard library should generally avoid
5051# introducing static constructors or destructors.
51- check_cxx_compiler_flag("-Wexit-time-destructors" CXX_SUPPORTS_EXIT_TIME_DESTRUCTORS_WARNING)
52+ check_cxx_compiler_flag("-Wexit-time-destructors -Werror=exit-time-destructors " CXX_SUPPORTS_EXIT_TIME_DESTRUCTORS_WARNING)
5253if (CXX_SUPPORTS_EXIT_TIME_DESTRUCTORS_WARNING)
53- list (APPEND SWIFT_RUNTIME_CORE_CXX_FLAGS "-Wexit-time-destructors" )
54+ list (APPEND SWIFT_RUNTIME_CORE_CXX_FLAGS "-Wexit-time-destructors"
55+ "-Werror=exit-time-destructors" )
5456endif ()
5557
5658add_subdirectory (SwiftShims)
You can’t perform that action at this time.
0 commit comments