We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2c86e32 + 6d2ea53 commit da8eb3cCopy full SHA for da8eb3c
cmake/modules/AddSwift.cmake
@@ -273,6 +273,13 @@ function(_add_variant_c_compile_flags)
273
# RTTI as well. This requires a newer SDK though and we do not have
274
# guarantees on the SDK version currently.
275
list(APPEND result "-D_HAS_STATIC_RTTI=0")
276
+
277
+ # NOTE(compnerd) workaround LLVM invoking `add_definitions(-D_DEBUG)` which
278
+ # causes failures for the runtime library when cross-compiling due to
279
+ # undefined symbols from the standard library.
280
+ if(NOT CMAKE_BUILD_TYPE STREQUAL Debug)
281
+ list(APPEND result "-U_DEBUG")
282
+ endif()
283
endif()
284
285
if(CFLAGS_ENABLE_ASSERTIONS)
0 commit comments