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

x.py: codegen-units-std = 0 not supported #57669

Closed
zilbuz opened this issue Jan 16, 2019 · 0 comments · Fixed by #61497
Closed

x.py: codegen-units-std = 0 not supported #57669

zilbuz opened this issue Jan 16, 2019 · 0 comments · Fixed by #61497
Labels
T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Comments

@zilbuz
Copy link
Contributor

zilbuz commented Jan 16, 2019

Trying to compile rustc with codegen-units-std = 0 in config.toml fails with the following error:

Updating only changed submodules
Submodules updated in 0.02 seconds
    Finished dev [unoptimized] target(s) in 0.19s
Building stage0 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `/home/zilbuz/dev/rustc/rust/build/bootstrap/debug/rustc - --crate-name ___ --print=file-names --target x86_64-unknown-linux-gnu --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro` (exit code: 1)
--- stderr
error: Value for codegen units must be a positive nonzero integer


command did not execute successfully: "/home/zilbuz/dev/rustc/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "8" "--release" "--features" "panic-unwind backtrace" "--manifest-path" "/home/zilbuz/dev/rustc/rust/src/libstd/Cargo.toml" "--message-format" "json"
expected success, got: exit code: 101
failed to run: /home/zilbuz/dev/rustc/rust/build/bootstrap/debug/bootstrap build -i --stage 1 src/libstd
Build completed unsuccessfully in 0:00:01

The codegen-units-std option isn't treated the same as the codegen-units option in the bootstrap's config.rs.

Is this intentional? Should I submit a PR to support codegen-units-std = 0?

If this is intentional, then I think an error should be raised as soon as the option is read rather than having the generic "Value for codegen units must be a positive nonzero integer" later.

@Centril Centril added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Jan 17, 2019
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue Jun 3, 2019
Centril added a commit to Centril/rust that referenced this issue Jun 4, 2019
…um-cpus, r=alexcrichton

Treat 0 as special value for codegen-units-std

Fixes rust-lang#57669
Centril added a commit to Centril/rust that referenced this issue Jun 4, 2019
…um-cpus, r=alexcrichton

Treat 0 as special value for codegen-units-std

Fixes rust-lang#57669
Centril added a commit to Centril/rust that referenced this issue Jun 4, 2019
…um-cpus, r=alexcrichton

Treat 0 as special value for codegen-units-std

Fixes rust-lang#57669
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants