Skip to content

Commit f7a4e2b

Browse files
eecksteingottesmm
authored andcommitted
cmake: correctly set NDEBUG for imported headers in SwiftCompilerSources
So that it's consistent with C++ sources rdar://110363377 (cherry picked from commit fa2ac84)
1 parent 5810477 commit f7a4e2b

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)