Skip to content

Conversation

supersonicbyte
Copy link

Add appropriate -tool suffix to linker flags in dynamic libraries when executing swift package command_plugin.

Motivation:

Resolves the following issue: #9062

Modifications:

Add appropriate -tool suffix to linker flags in dynamic libraries when executing swift package command_plugin.

Result:

Executing swift package command_plugin with dynamic dependencies works.

@supersonicbyte
Copy link
Author

@swift-ci test

1 similar comment
@owenv
Copy link
Contributor

owenv commented Sep 5, 2025

@swift-ci test

Copy link
Contributor

@owenv owenv left a comment

Choose a reason for hiding this comment

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

lgtm. Could you please add a test to CommandPluginTests in PackageCommandTests.swift that covers this case?

@supersonicbyte
Copy link
Author

lgtm. Could you please add a test to CommandPluginTests in PackageCommandTests.swift that covers this case?

ofc!

@supersonicbyte
Copy link
Author

@owenv added, can you run the CI please?

@owenv
Copy link
Contributor

owenv commented Sep 5, 2025

@swift-ci test

@@ -6948,5 +6948,172 @@ struct PackageCommandTests {
expectNoDiagnostics(observability.diagnostics)
}
}

@Test(arguments: getBuildData(for: SupportedBuildSystemOnAllPlatforms))
Copy link
Contributor

Choose a reason for hiding this comment

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

It's ok to wrap this in something like this for now to get to a passing CI run:

withKnownIssue {
} when: {
                ProcessInfo.hostOperatingSystem == .windows
                    || (ProcessInfo.hostOperatingSystem == .linux && data.buildSystem == .swiftbuild)
            }

There are some unrelated issues setting up the runtime library paths on linux for plugin executables which I haven't fixed yet.

Copy link
Author

Choose a reason for hiding this comment

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

wrapped! thanks.

Copy link
Author

Choose a reason for hiding this comment

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

@owenv can you rerun the CI again, please?

@supersonicbyte
Copy link
Author

@swift-ci test

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.

3 participants