Skip to content

Commit 983a446

Browse files
committed
SwiftDemangle: disable ABI breaking checks
Since this library uses ADT headers, it will pull in a dependency for LLVMSupport (Error.cpp has the necessary variable declaration for ABI breaking checks). Disable the ABI breaking check validation as we only use the library for header-only dependencies. Avoiding this dependency shaves nearly 900 KiB from the resultant binary.
1 parent 1e7dae3 commit 983a446

File tree

2 files changed

+22
-16
lines changed

2 files changed

+22
-16
lines changed

lib/Demangling/CMakeLists.txt

+14-12
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
add_swift_library(swiftDemangling STATIC
2-
Demangler.cpp
3-
Context.cpp
4-
ManglingUtils.cpp
5-
NodeDumper.cpp
6-
NodePrinter.cpp
7-
OldDemangler.cpp
8-
OldRemangler.cpp
9-
Punycode.cpp
10-
Remangler.cpp
11-
TypeDecoder.cpp
12-
)
1+
add_swift_library(swiftDemangling
2+
STATIC
3+
Demangler.cpp
4+
Context.cpp
5+
ManglingUtils.cpp
6+
NodeDumper.cpp
7+
NodePrinter.cpp
8+
OldDemangler.cpp
9+
OldRemangler.cpp
10+
Punycode.cpp
11+
Remangler.cpp
12+
TypeDecoder.cpp
13+
C_COMPILE_FLAGS
14+
-DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1)
1315

lib/SwiftDemangle/CMakeLists.txt

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
add_swift_library(swiftDemangle SHARED
2-
SwiftDemangle.cpp
3-
MangleHack.cpp
4-
LINK_LIBRARIES swiftDemangling)
1+
add_swift_library(swiftDemangle
2+
SHARED
3+
SwiftDemangle.cpp
4+
MangleHack.cpp
5+
LINK_LIBRARIES
6+
swiftDemangling
7+
C_COMPILE_FLAGS
8+
-DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1)
59

610
swift_install_in_component(compiler
711
TARGETS swiftDemangle

0 commit comments

Comments
 (0)