Skip to content

Fix the clang dependency of sourcekit libraries. #68780

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 1 commit into from
Oct 8, 2023

Conversation

hjyamauchi
Copy link
Contributor

Because swift_swap_compiler_if_needed updates the compiler ID to Clang, we need to account for it when deciding to add a dependencies on clang. Otherwise, the sourcekit build could fail due to lack of clang dependency.

@hjyamauchi
Copy link
Contributor Author

@compnerd

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.

We need to track if we need to add the dependency, if we are using clang to build, we won't be needing to swap and this might add a dependency on a just built clang that cannot be used.

Because swift_swap_compiler_if_needed updates the compiler ID to
Clang, we need to account for it when deciding to add a dependency on
clang. Otherwise, the sourcekit build could fail due to the clang
executable not having been built there yet.
@hjyamauchi
Copy link
Contributor Author

We need to track if we need to add the dependency, if we are using clang to build, we won't be needing to swap and this might add a dependency on a just built clang that cannot be used.

Done. PTAL.

@compnerd
Copy link
Member

compnerd commented Oct 6, 2023

@swift-ci please test

@compnerd
Copy link
Member

compnerd commented Oct 7, 2023

@swift-ci please test Windows 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 hope that one day we can remove these workarounds and build components without UB in the build system.

@compnerd compnerd merged commit a2cc0d0 into swiftlang:main Oct 8, 2023
hjyamauchi added a commit to hjyamauchi/swift that referenced this pull request Dec 9, 2024
Because swift_swap_compiler_if_needed updates the compiler ID to
Clang, we need to account for it when deciding to add a dependency on
clang. Otherwise, the sourcekit build could fail due to the clang
executable not having been built there yet.

Cherrypick PR swiftlang#68780
Cherrypick commit 71d8118
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