Skip to content

Commit fa2ac84

Browse files
committed
cmake: correctly set NDEBUG for imported headers in SwiftCompilerSources
So that it's consistent with C++ sources rdar://110363377
1 parent 762cd4d commit fa2ac84

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

SwiftCompilerSources/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ function(add_swift_compiler_modules_library name)
8787
list(APPEND swift_compile_options "-O" "-cross-module-optimization")
8888
endif()
8989

90+
if(NOT LLVM_ENABLE_ASSERTIONS)
91+
list(APPEND swift_compile_options "-Xcc" "-DNDEBUG")
92+
endif()
93+
9094
if(NOT SWIFT_STDLIB_SUPPORT_BACK_DEPLOYMENT)
9195
list(APPEND swift_compile_options "-Xfrontend" "-disable-legacy-type-info")
9296
endif()

0 commit comments

Comments
 (0)