Skip to content

Commit cdc3f5b

Browse files
nglevinadincebic
authored andcommitted
Add a build setting to disable Swift stdlib binary thinning.
This toggles a mode in support tooling to skip the "lipo" phase, instead going straight to a copy + set 0o755 operation. PiperOrigin-RevId: 854618465 (cherry picked from commit 9e5d844)
1 parent 87c519d commit cdc3f5b

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

apple/build_settings/build_settings.bzl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ build_flags = {
2323
doc = """
2424
Configuration for enabling XCFramework import rules use the xcframework_processor_tool to
2525
parse the XCFramework bundle Info.plist file. See apple/internal/apple_xcframework_import.bzl
26+
""",
27+
default = False,
28+
),
29+
"disable_swift_stdlib_binary_thinning": struct(
30+
doc = """
31+
Disables binary thinning for Swift stdlib binaries, matching the most recent Xcode handling for
32+
Swift support dylibs.
2633
""",
2734
default = False,
2835
),

apple/internal/partials/swift_dylibs.bzl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ def _swift_dylib_action(
9797
if strip_bitcode:
9898
swift_stdlib_tool_args.add("--strip_bitcode")
9999

100+
if platform_prerequisites.build_settings.disable_swift_stdlib_binary_thinning:
101+
swift_stdlib_tool_args.add("--disable_binary_thinning")
102+
100103
apple_support.run(
101104
actions = actions,
102105
apple_fragment = platform_prerequisites.apple_fragment,

0 commit comments

Comments
 (0)