Skip to content

x.py has usability issues #148816

@mccakit

Description

@mccakit

Please add the ability to pass RUSTFLAGS (or equivalent) to targets when using x.py. Right now, the only way is to pass environment variables, and even then it straight-up ignores them sometimes.

It also does weird stuff with copying files from the sysroot or failing with missing CRT files that I don't understand. Why does building Rust itself and cross-compiling the standard library work this way?

Clang is the linker, and I want to pass arguments per-target: --sysroot, include dirs, library dirs, etc., and just build. But no. x.py literally rebuilds the compiler every time I try to build the standard library, even if I tell it in bootstrap.toml to just use my existing rustc.

People literally embed Rust dependencies into C/C++ or Python projects. Why is this workflow (installing from source) so different?

I will not use binary distributions. Platform defaults aren’t always the same. I don’t want to rely on libstdc++ or gcc_s for Linux builds. I just want: target-specific flags + existing compiler + build stdlib — what can be done to make this easier?

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