Skip to content

rustbuild ignores the llvm-config setting #35199

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

Closed
nagisa opened this issue Aug 2, 2016 · 5 comments · Fixed by #42429
Closed

rustbuild ignores the llvm-config setting #35199

nagisa opened this issue Aug 2, 2016 · 5 comments · Fixed by #42429
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@nagisa
Copy link
Member

nagisa commented Aug 2, 2016

I got in my src/bootstrap/config.toml:

[target.x86_64-unknown-linux-gnu]
…
llvm-config = "/home/nagisa/local/bin/llvm-config"

but rustc_llvm/build.rs still seems to attempt using /usr/bin/llvm-config

$ cat build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/rustc_llvm-9ee423514f5f4196/output 
cargo:rustc-cfg=cargobuild
cargo:rerun-if-changed=/usr/bin/llvm-config

cc @alexcrichton

@alexcrichton alexcrichton added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Aug 2, 2016
@alexcrichton
Copy link
Member

I think that the actual behavior (from IRC) that happened here was that llvm-config configuration change in cargo.toml, but the build script wasn't re-run.

The build script should probably print out rerun-if-changed pointing at config.toml if it exists, passed through via rustbuild.

@Mark-Simulacrum
Copy link
Member

@alexcrichton I think the build script doesn't point to config.toml with rerun-if-changed; is it possible we could make this into an E-easy issue? I get the feeling that this would also make a decent intro into rustbuild.

@alexcrichton alexcrichton added the E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. label May 10, 2017
@alexcrichton
Copy link
Member

Certainly!

I think we'll need to pass the path of config.toml via an env var, but that shouldn't be too onerous to do in rustbuild either. If anyone's got any questions please feel free to ask!

@venkatagiri
Copy link
Contributor

I would like to work on this. Can I use the env var CFG_TOML to pass the path of config.toml from bootstrap::compile::rustc? Or LLVM_CFG_TOML or CONFIG_TOML.

@Mark-Simulacrum
Copy link
Member

I think an env var would probably be the best approach. CFG_LLVM_TOML seems good, but that can be bikeshedded in the PR. Let us know if we can do anything to help!

Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue Jun 5, 2017
…hton

rustc_llvm: re-run build script if config.toml changes

closes rust-lang#35199
frewsxcv added a commit to frewsxcv/rust that referenced this issue Jun 7, 2017
…hton

rustc_llvm: re-run build script if config.toml changes

closes rust-lang#35199
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants