File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -635,9 +635,10 @@ endif()
635635
636636if (NOT SWIFT_COMPILER_IS_MSVC_LIKE)
637637 # CMake's default for CMAKE_CXX_FLAGS_RELEASE is "-O3 -DNDEBUG". Let's avoid "-O3" for consistency
638- # between Release and RelWithDebInfo. And let's not set -DNDEBUG because we're setting that manually
639- # based on LLVM_ENABLE_ASSERTIONS.
640- set (CMAKE_CXX_FLAGS_RELEASE "-O2" )
638+ # between Release and RelWithDebInfo. Dropping -DNDEBUG from this setting is blocked by triggering
639+ # a test failure of Swift-Unit :: Syntax/./SwiftSyntaxTests/TypeSyntaxTests.MetatypeTypeWithAPIs
640+ # because unit tests don't currently explicitly set -DNDEBUG/-UNDEBUG.
641+ set (CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG" )
641642
642643 _compute_lto_flag("${SWIFT_TOOLS_ENABLE_LTO} " _lto_flag_out)
643644 if (_lto_flag_out)
You can’t perform that action at this time.
0 commit comments