Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Sources/SWBApplePlatform/Specs/DarwinProductTypes.xcspec
Original file line number Diff line number Diff line change
Expand Up @@ -474,4 +474,15 @@
com.apple.package-type.mach-o-executable
);
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the objects have no differing properties across Windows/Darwin/Unix, should we just put one single spec in the global domain for simplicity rather than 3 separate ones?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Over the years we deduplicated the same kind of thing across macOS and iOS to avoid similar redundancies.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The windows one inherits from a different product type, so that one is somewhat unique

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I missed that. That's a little unfortunate; I'd hoped to avoid platform-specific product type hierarchies as much as possible but we could always change this sort of thing later.

{
_Domain = darwin;
Type = ProductType;
Identifier = org.swift.product-type.common.object;
BasedOn = com.apple.product-type.objfile;
Class = XCStandaloneExecutableProductType;
Description = "Object File";
IconNamePrefix = "TargetPlugin";
DefaultTargetName = "Object File";
},

)
11 changes: 11 additions & 0 deletions Sources/SWBGenericUnixPlatform/Specs/Unix.xcspec
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,15 @@
Identifier = com.apple.product-type.framework.static;
BasedOn = com.apple.product-type.framework;
},

{
Domain = generic-unix;
Type = ProductType;
Identifier = org.swift.product-type.common.object;
BasedOn = com.apple.product-type.objfile;
Class = XCStandaloneExecutableProductType;
Description = "Object File";
IconNamePrefix = "TargetPlugin";
DefaultTargetName = "Object File";
},
)
11 changes: 11 additions & 0 deletions Sources/SWBWindowsPlatform/Specs/Windows.xcspec
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,15 @@
},
);
},
{
Domain = windows;
Type = ProductType;
Identifier = org.swift.product-type.common.object;
BasedOn = org.swift.product-type.library.object;
Class = XCStandaloneExecutableProductType;
Name = "Object Library";
Description = "Object library";
IconNamePrefix = "TargetLibrary";
DefaultTargetName = "Object Library";
},
)
1 change: 1 addition & 0 deletions Sources/SwiftBuild/ProjectModel/Targets.swift
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ extension ProjectModel {
public enum ProductType: String, Sendable, Codable, CaseIterable {
case application = "com.apple.product-type.application"
case staticArchive = "com.apple.product-type.library.static"
case commonObject = "org.swift.product-type.common.object"
case objectFile = "com.apple.product-type.objfile"
case dynamicLibrary = "com.apple.product-type.library.dynamic"
case framework = "com.apple.product-type.framework"
Expand Down
Loading