Skip to content

Commit 143dcf4

Browse files
authored
Merge pull request #826 from daveinglis/common_object_product_type
Create a new product type so the PIF remains platform agnostic
2 parents 823f4f8 + 10b8c19 commit 143dcf4

File tree

4 files changed

+34
-0
lines changed

4 files changed

+34
-0
lines changed

Sources/SWBApplePlatform/Specs/DarwinProductTypes.xcspec

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,4 +474,15 @@
474474
com.apple.package-type.mach-o-executable
475475
);
476476
},
477+
{
478+
_Domain = darwin;
479+
Type = ProductType;
480+
Identifier = org.swift.product-type.common.object;
481+
BasedOn = com.apple.product-type.objfile;
482+
Class = XCStandaloneExecutableProductType;
483+
Description = "Object File";
484+
IconNamePrefix = "TargetPlugin";
485+
DefaultTargetName = "Object File";
486+
},
487+
477488
)

Sources/SWBGenericUnixPlatform/Specs/Unix.xcspec

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,15 @@
8080
Identifier = com.apple.product-type.framework.static;
8181
BasedOn = com.apple.product-type.framework;
8282
},
83+
84+
{
85+
Domain = generic-unix;
86+
Type = ProductType;
87+
Identifier = org.swift.product-type.common.object;
88+
BasedOn = com.apple.product-type.objfile;
89+
Class = XCStandaloneExecutableProductType;
90+
Description = "Object File";
91+
IconNamePrefix = "TargetPlugin";
92+
DefaultTargetName = "Object File";
93+
},
8394
)

Sources/SWBWindowsPlatform/Specs/Windows.xcspec

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,15 @@
105105
},
106106
);
107107
},
108+
{
109+
Domain = windows;
110+
Type = ProductType;
111+
Identifier = org.swift.product-type.common.object;
112+
BasedOn = org.swift.product-type.library.object;
113+
Class = XCStandaloneExecutableProductType;
114+
Name = "Object Library";
115+
Description = "Object library";
116+
IconNamePrefix = "TargetLibrary";
117+
DefaultTargetName = "Object Library";
118+
},
108119
)

Sources/SwiftBuild/ProjectModel/Targets.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ extension ProjectModel {
310310
public enum ProductType: String, Sendable, Codable, CaseIterable {
311311
case application = "com.apple.product-type.application"
312312
case staticArchive = "com.apple.product-type.library.static"
313+
case commonObject = "org.swift.product-type.common.object"
313314
case objectFile = "com.apple.product-type.objfile"
314315
case dynamicLibrary = "com.apple.product-type.library.dynamic"
315316
case framework = "com.apple.product-type.framework"

0 commit comments

Comments
 (0)