Skip to content
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

config.toml: Allow passing arbitrary configure and build args to LLVM cmake #138027

Closed
tgross35 opened this issue Mar 5, 2025 · 3 comments
Closed
Labels
A-bootstrap-config Area: bootstrap `config.toml` and the config system C-enhancement Category: An issue proposing an enhancement or a PR with one. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@tgross35
Copy link
Contributor

tgross35 commented Mar 5, 2025

LLVM's build system exposes a lot of flags that may be nice to tweak, but we probably don't want to worry about mapping directly in config.toml. It would be helpful to support something like the following:

[llvm]
configure-args = [
    "-DCMAKE_C_COMPILER_LAUNCHER=sccache",
    "-DCMAKE_CXX_COMPILER_LAUNCHER=sccache",
    "-DLLVM_OPTIMIZED_TABLEGEN=true",
    "-DBUILD_SHARED_LIBS=true", # unsure whether this would work with Rust
]
build-args = [
    # ...
]

These would get passed to build_arg and configure_arg on cmake::Config.

@tgross35 tgross35 added A-bootstrap-config Area: bootstrap `config.toml` and the config system C-enhancement Category: An issue proposing an enhancement or a PR with one. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Mar 5, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 5, 2025
@tgross35
Copy link
Contributor Author

tgross35 commented Mar 5, 2025

It might also be good to just enable -DLLVM_OPTIMIZED_TABLEGEN=true by default when debug = true is set for the build time boost.

@jieyouxu jieyouxu removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 5, 2025
@moxian
Copy link
Contributor

moxian commented Mar 6, 2025

Doesn't build-config introduced in #93756 do exactly this already?

@tgross35
Copy link
Contributor Author

tgross35 commented Mar 6, 2025

I guess so, I could never find that option. Thanks for pointing it out.

@tgross35 tgross35 closed this as completed Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-bootstrap-config Area: bootstrap `config.toml` and the config system C-enhancement Category: An issue proposing an enhancement or a PR with one. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

4 participants