Skip to content

Skip adding alias targets when they don't exist #36782

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

Conversation

porglezomp
Copy link
Contributor

The CMake uses the concept of a "primary variant" which isn't necessarily aligned with either the host or target. In some cases, like cross-compiling an iOS compiler toolchain for macosx-arm64, the expected "primary variant" target will be missing and so CMake will fail. We can skip adding the alias since build-script will call the more specific target anyway.

The CMake uses the concept of a "primary variant" which isn't
necessarily aligned with either the host or target. In some cases, like
cross-compiling an iOS compiler toolchain for macosx-arm64, the expected
"primary variant" target will be missing and so CMake will fail. We can
skip adding the alias since build-script will call the more specific
target anyway.
@porglezomp porglezomp requested review from compnerd and edymtt April 6, 2021 21:40
@porglezomp
Copy link
Contributor Author

@swift-ci please smoke test

@porglezomp
Copy link
Contributor Author

@swift-ci please smoke test

@porglezomp
Copy link
Contributor Author

I'm also rebuilding locally against a preset that I'm sure exercises cross-compilation

@porglezomp
Copy link
Contributor Author

@swift-ci please smoke test macOS Platform

1 similar comment
@porglezomp
Copy link
Contributor Author

@swift-ci please smoke test macOS Platform

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

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

I believe that this should be safe.

Adjust the condition and message to skip the primary variant alias in a
way that's more clear and more directly matches the explanation in the
comments.

Co-authored-by: Eric Miotto <[email protected]>
@porglezomp porglezomp force-pushed the feeling-rather-cross-compiling branch from 6f4c29c to 2d3d515 Compare April 8, 2021 06:50
@porglezomp
Copy link
Contributor Author

Just squashing the two review fixup commits and improving their commit message.

@porglezomp
Copy link
Contributor Author

@swift-ci please smoke test and merge

1 similar comment
@porglezomp
Copy link
Contributor Author

@swift-ci please smoke test and merge

@porglezomp
Copy link
Contributor Author

@swift-ci please smoke test macOS Platform and merge

@porglezomp
Copy link
Contributor Author

@swift-ci please smoke test macOS Platform

1 similar comment
@porglezomp
Copy link
Contributor Author

@swift-ci please smoke test macOS Platform

@porglezomp porglezomp merged commit 37097c1 into swiftlang:main Apr 8, 2021
@porglezomp porglezomp deleted the feeling-rather-cross-compiling branch April 8, 2021 23:04
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