Skip to content

Commit 712b24f

Browse files
committed
Merge remote-tracking branch 'origin/master' into master-rebranch
2 parents f2c980c + 937deb4 commit 712b24f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

stdlib/toolchain/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,18 @@ if("Thread" IN_LIST SWIFT_RUNTIME_USE_SANITIZERS)
4141
list(APPEND CXX_LINK_FLAGS "-fsanitize=thread")
4242
endif()
4343

44+
# Do not enforce checks for LLVM's ABI-breaking build settings.
45+
# The Swift runtime uses some header-only code from LLVM's ADT classes,
46+
# but we do not want to link libSupport into the runtime. These checks rely
47+
# on the presence of symbols in libSupport to identify how the code was
48+
# built and cause link failures for mismatches. Without linking that library,
49+
# we get link failures regardless, so instead, this just disables the checks.
50+
if(CMAKE_VERSION VERSION_LESS 3.12)
51+
append("-DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
52+
else()
53+
add_compile_definitions(LLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1)
54+
endif()
55+
4456

4557
add_subdirectory(legacy_layouts)
4658
add_subdirectory(Compatibility50)

0 commit comments

Comments
 (0)