You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow the STRIP_INSTALLED_PRODUCT build setting in the Swift Build
settings to be configuration in SwiftPM.
Add an "enable/disable" build options that will sets the settings value
accordingly. When not set, the products are not stripped, matching the
native build system.
Fixes: #10037
Issue: rdar://176554583
Depends on: swiftlang/swift-build#1395
@@ -187,7 +190,8 @@ public struct BuildParameters: Encodable {
187
190
linkingParameters:Linking=.init(),
188
191
outputParameters:Output=.init(),
189
192
testingParameters:Testing=.init(),
190
-
apiDigesterMode:APIDigesterMode?=nil
193
+
apiDigesterMode:APIDigesterMode?=nil,
194
+
stripProducts:Bool?=nil,
191
195
)throws{
192
196
// Default to the unversioned triple if none is provided so that we defer to the package's requested deployment target, for Darwin platforms. For other platforms, continue to include the version since those don't have the concept of a package-specified version, and the version is meaningful for some platforms including Android and FreeBSD.
193
197
lettriple=try triple ??{
@@ -253,6 +257,7 @@ public struct BuildParameters: Encodable {
253
257
self.outputParameters = outputParameters
254
258
self.testingParameters = testingParameters
255
259
self.apiDigesterMode = apiDigesterMode
260
+
self.stripProducts = stripProducts
256
261
}
257
262
258
263
/// The path to the build directory (inside the data directory).
with selectedBuildSystem:BuildSystemProvider.Kind,
21
+
)->Self{
22
+
return.error("Command line option '--\(isEnabled ?"enable":"--disable")--experimental-strip-products' is unsupported with build system '\(selectedBuildSystem)'. Only use with '\(BuildSystemProvider.Kind.swiftbuild)' build system with configuration '\(BuildConfiguration.release)'")
0 commit comments