Skip to content

build-script: fix --skip-build-llvm not having full effect #82233

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MaxDesiatov
Copy link
Contributor

@MaxDesiatov MaxDesiatov commented Jun 13, 2025

While LLVM cannot be completely disabled when Swift is built, we should still allow skipping LLVM configuration and build steps when Swift is not built. This can happen, for example, when build-script user wants an ad-hoc incremental build with --skip-build-swift for products that don't depend on LLVM and Swift, or if LLVM and Swift were already configured and built in previous build-script invocations.

While LLVM cannot be completely disabled when Swift is built, we should still allow skipping LLVM configuration and build steps when Swift is not built. This can happen, for example, when `build-script` user wants an ad-hoc incremental build, and `--skip-build-swift` is also passed.
@MaxDesiatov MaxDesiatov requested a review from etcwilde as a code owner June 13, 2025 11:21
@MaxDesiatov MaxDesiatov added the build-script Area → utils: The build script label Jun 13, 2025
@MaxDesiatov MaxDesiatov added the python Flag: Python source code label Jun 13, 2025
@MaxDesiatov MaxDesiatov requested a review from shahmishal as a code owner June 13, 2025 11:21
@MaxDesiatov
Copy link
Contributor Author

@swift-ci smoke test

Copy link
Contributor

@bnbarham bnbarham left a comment

Choose a reason for hiding this comment

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

Seems reasonable to me. Do we normally use the just-built clang or host clang when building everything (that is C/C++) else?

@MaxDesiatov
Copy link
Contributor Author

Seems reasonable to me. Do we normally use the just-built clang or host clang when building everything (that is C/C++) else?

Just built, same as Swift. That's why making it conditional on --skip-build-swift makes sense IMO.

@MaxDesiatov
Copy link
Contributor Author

@swift-ci smoke test

Copy link
Contributor

@etcwilde etcwilde left a comment

Choose a reason for hiding this comment

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

I think this is okay. (Can you check that the lldb product builds correctly standalone/doesn't depend on the required pieces of the LLVM product)
@drexin wrote the build-script product for LLVM though, so he might have better recollection about why it was done the way that it was.

@etcwilde etcwilde requested a review from drexin June 13, 2025 22:48
@drexin
Copy link
Contributor

drexin commented Jun 13, 2025

I think this is okay. (Can you check that the lldb product builds correctly standalone/doesn't depend on the required pieces of the LLVM product) @drexin wrote the build-script product for LLVM though, so he might have better recollection about why it was done the way that it was.

The comment above basically explains it, but I also only reproduced what build-script-impl did.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-script Area → utils: The build script python Flag: Python source code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants