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

Setting cxx in cargo.toml doesn't pass through to build.rs scripts such as in rustc_llvm #40534

Closed
mstewartgallus opened this issue Mar 15, 2017 · 2 comments
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@mstewartgallus
Copy link
Contributor

mstewartgallus commented Mar 15, 2017

rustc_llvm has a custom build.rs script that calls the gcc crate and compiles bindings to LLVM. However, this doesn't call the C++ compiler passed in the cxx option in the cargo.toml configuration. Instead it just calls the default of c++. This ends up breaking builds for me because I want to use an up to date clang to compile rust instead of my distribution provided gcc which is too old. My current hacky workaround is to run env CXX=clang++-3.8 CC=clang-3.8 ./x.py build.

@Mark-Simulacrum
Copy link
Member

This should be fixed if/when #42206 is merged. Also, cc #42255.

@Mark-Simulacrum Mark-Simulacrum added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Jun 13, 2017
@Mark-Simulacrum Mark-Simulacrum added the C-bug Category: This is a bug. label Jul 27, 2017
@Mark-Simulacrum Mark-Simulacrum added this to the impl period milestone Sep 15, 2017
@aturon aturon removed this from the impl period milestone Sep 15, 2017
@jyn514
Copy link
Member

jyn514 commented Feb 3, 2023

This seems to have been fixed:

None => (builder.cc(target), builder.cxx(target).unwrap()),

@jyn514 jyn514 closed this as completed Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. 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