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()
41
41
42
42
# C++ code in the runtime and standard library should generally avoid
43
43
# 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 )
45
45
if (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" )
47
48
endif ()
48
49
49
50
# C++ code in the runtime and standard library should generally avoid
50
51
# 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 )
52
53
if (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" )
54
56
endif ()
55
57
56
58
add_subdirectory (SwiftShims )
You can’t perform that action at this time.
0 commit comments