Skip to content

Utilities/bootstrap: fix ignored --clang-path option #5894

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 3 commits into from
Dec 2, 2022

Conversation

MaxDesiatov
Copy link
Contributor

Motivation:

Utilities/bootstrap has --clang-path, which currently is parsed, but not propagated anywhere. Ignoring this option caused issues on certain Linux distributions, where the process of bringing up clang is convoluted and bootstrap ended up using GCC, which caused build failures.

Modifications:

args.clang_path value is now passed to CMake as -DCMAKE_C_COMPILER.

Result:

Build failures on Linux in certain configurations are fixed.

@MaxDesiatov
Copy link
Contributor Author

@swift-ci please smoke test

1 similar comment
@MaxDesiatov
Copy link
Contributor Author

@swift-ci please smoke test

@MaxDesiatov
Copy link
Contributor Author

@swift-ci please smoke test Linux

@MaxDesiatov MaxDesiatov self-assigned this Nov 14, 2022
@MaxDesiatov MaxDesiatov added the WIP Work in progress label Nov 14, 2022
@MaxDesiatov MaxDesiatov marked this pull request as draft November 14, 2022 15:14
@neonichu
Copy link
Contributor

Do we need to do anything to propagate it to the second stage build as well?

@MaxDesiatov
Copy link
Contributor Author

Do we need to do anything to propagate it to the second stage build as well?

By that, are you referring to "Building SwiftPM (with a freshly built swift-build)" stage? If so, I haven't found a way to instruct swift-build to pick a specific C/C++ compiler so far, other than creating a completely separate destination.json, which I assume is not an option here.

@neonichu
Copy link
Contributor

By that, are you referring to "Building SwiftPM (with a freshly built swift-build)" stage? If so, I haven't found a way to instruct swift-build to pick a specific C/C++ compiler so far, other than creating a completely separate destination.json, which I assume is not an option here.

Yep, that's what I meant. Looking at UserToolchain, it seems as if setting CC in the environment ought to work? If it doesn't in practice, we should fix that.

MaxDesiatov added a commit to swiftlang/swift that referenced this pull request Nov 28, 2022
This fixes an issue resolved in jpsim/Yams#353, which is currently blocking swiftlang/swift-package-manager#5894
MaxDesiatov added a commit to MaxDesiatov/swift-source-compat-suite that referenced this pull request Nov 28, 2022
This fixes an issue resolved in jpsim/Yams#353, which is currently blocking swiftlang/swift-package-manager#5894.
@MaxDesiatov
Copy link
Contributor Author

@swift-ci please smoke test

@MaxDesiatov MaxDesiatov marked this pull request as ready for review November 30, 2022 11:13
Ignoring this option caused issues on certain Linux distributions, where the process of bringing up clang is convoluted and `bootstrap` ended up using GCC, which caused build failures.
@MaxDesiatov
Copy link
Contributor Author

@swift-ci please smoke test

@MaxDesiatov MaxDesiatov removed the WIP Work in progress label Nov 30, 2022
@MaxDesiatov
Copy link
Contributor Author

@tomerd @neonichu this is ready for review

@MaxDesiatov MaxDesiatov merged commit ce9189b into main Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants