Skip to content

bootstrap: RUSTFLAGS_BOOTSTRAP does not affect building bootstrap #94234

Closed
@jonhoo

Description

@jonhoo

I'll prefix this with: I don't know if this is a bug, or just confusing behavior.

It appears that setting RUSTFLAGS_BOOTSTRAP does not affect the RUSTFLAGS used to build the Rust-based bootstrap binary (src/bootstrap). Instead, when x.py builds src/bootstrap, it just uses RUSTFLAGS directly:

# preserve existing RUSTFLAGS
env.setdefault("RUSTFLAGS", "")

Given the name of RUSTFLAGS_BOOTSTRAP, this seems counterintuitive. Even if this is the desired behavior, it should probably be documented. Or perhaps x.py could detect if RUSTFLAGS_BOOTSTRAP is set and warn about the fact that it is ignored?

Meta

rustc --version --verbose:

rustc 1.58.1 (db9d1b20b 2022-01-20)
binary: rustc
commit-hash: db9d1b20bba1968c1ec1fc49616d4742c1725b4b
commit-date: 2022-01-20
host: x86_64-unknown-linux-gnu
release: 1.58.1
LLVM version: 13.0.0

Metadata

Metadata

Assignees

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