Skip to content

Commit abf1552

Browse files
committed
Set DEPLOYMENT_POSTPROCESSING for release builds (#8378)
Use DEPLOYMENT_POSTPROCESSING set to NO instead of ENTITLEMENTS_DONT_REMOVE_GET_TASK_ALLOW when get-task-allow entitlement is requested to ensure release builds keep entitlement when needed.
1 parent e281a8c commit abf1552

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Sources/SwiftBuildSupport/PackagePIFBuilder.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,7 @@ public final class PackagePIFBuilder {
633633
releaseSettings[.DEBUG_INFORMATION_FORMAT] = "dwarf-with-dsym"
634634
releaseSettings[.GCC_OPTIMIZATION_LEVEL] = "s"
635635
releaseSettings[.SWIFT_OPTIMIZATION_LEVEL] = "-Owholemodule"
636+
releaseSettings[.DEPLOYMENT_POSTPROCESSING] = "YES"
636637
builder.project.addBuildConfig { id in BuildConfig(id: id, name: "Release", settings: releaseSettings) }
637638
}
638639

Sources/SwiftBuildSupport/SwiftBuildSystem.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@ public final class SwiftBuildSystem: SPMBuildCore.BuildSystem {
10091009
var settings: [String: String] = [:]
10101010
// TODO: debugInfoFormat: https://github.com/swiftlang/swift-build/issues/560
10111011
if parameters.shouldEnableDebuggingEntitlement {
1012-
settings["ENTITLEMENTS_DONT_REMOVE_GET_TASK_ALLOW"] = "YES"
1012+
settings["DEPLOYMENT_POSTPROCESSING"] = "NO"
10131013
}
10141014
// TODO: omitFramePointer: https://github.com/swiftlang/swift-build/issues/561
10151015
return settings

0 commit comments

Comments
 (0)