Skip to content

Commit b96b2d9

Browse files
authored
Merge pull request #68410 from gottesmm/release/5.9.0-add-ndebug-to-swiftcompsources
[5.9.0] cmake: correctly set NDEBUG for imported headers in SwiftCompilerSources
2 parents 5810477 + f7a4e2b commit b96b2d9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

SwiftCompilerSources/CMakeLists.txt

+4
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)