Skip to content

build.ps1: clean up Build-SPMProject for portability and future adjustments #83605

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

Merged
merged 5 commits into from
Aug 8, 2025

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Aug 7, 2025

Clean up the Build-SPMProject for cross-compilation and debug info generation. This setup makes this easier to adjust in the future.

CodeView is only available on Windows, ensure that we restrict it to
that. Default to DWARF even if the user requested codeview to ensure
that we generate debug info for non-Windows hosts.
Ensure that we use the `$Platform.OS` rather than the hardcoded
`Windows` value, which allows us to be setup for building for
non-Windows hosts.
Rather than re-compute the SDKROOT to form the path, use the environment
variable that we setup for the `SDKROOT` to make SDKROOT relative paths.
Use the `Path` to resolve `swift` and use that to build and test
packages rather than computing the absolute path to the swift driver
driver.
@compnerd
Copy link
Member Author

compnerd commented Aug 7, 2025

CC: @Steelskin

@compnerd
Copy link
Member Author

compnerd commented Aug 7, 2025

@swift-ci please smoke test

@compnerd
Copy link
Member Author

compnerd commented Aug 8, 2025

@swift-ci please smoke test macOS platform

@compnerd compnerd merged commit b4d843f into swiftlang:main Aug 8, 2025
3 checks passed
@compnerd compnerd deleted the spm-build branch August 8, 2025 19:51
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.

2 participants