Skip to content

[SwiftBuild] Use hostBuildTool product type for build plugin targets #8936

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hamishknight
Copy link

Match how macros are handled and use the hostBuildTool product type.

rdar://155792370

…rgets

Match how macros are handled and use the `hostBuildTool` product
type.

rdar://155792370
@hamishknight
Copy link
Author

@swift-ci please test

@MaxDesiatov MaxDesiatov changed the title [SwiftBuild] Use hostBuildTool product type for SPM build plugin targets [SwiftBuild] Use hostBuildTool product type for build plugin targets Jul 15, 2025
@@ -39,7 +39,7 @@ extension PackagePIFProjectBuilder {
let pluginTargetKeyPath = try self.project.addTarget { _ in
ProjectModel.Target(
id: pluginModule.pifTargetGUID,
productType: .executable,
productType: .hostBuildTool,
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: can we add an automated tests to ensure we don't regress in the future?

Copy link
Author

Choose a reason for hiding this comment

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

As far as I could tell, we don't really have any existing unit tests for this logic, only integration tests, unless I'm overlooking something?

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree adding more test coverage would be beneficial.

@pmattos Did you add any tests for the PIF generation in libSwiftPM?

Copy link
Contributor

Choose a reason for hiding this comment

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

No, I didn't... only those on the Xcode side of things.

We do have XCBuild PIF tests that we plan to port over eventually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants