Skip to content

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

Closed
@mstewartgallus

Description

@mstewartgallus

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions