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

Bootstrap feature request: set --jobs in config.toml #131836

Closed
RalfJung opened this issue Oct 17, 2024 · 1 comment · Fixed by #131838
Closed

Bootstrap feature request: set --jobs in config.toml #131836

RalfJung opened this issue Oct 17, 2024 · 1 comment · Fixed by #131838
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@RalfJung
Copy link
Member

To reduce RAM usage I'd like bootstrap to use fewer than all of my cores. (Many of them are efficiency cores so it's unclear that it's really so beneficial to use them all.) But currently I'd have to set -j on every single bootstrap invocation, which is not great. Would be nice if this could be set in the config file, like most other options can.

@RalfJung RalfJung added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Oct 17, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Oct 17, 2024
@jieyouxu jieyouxu added C-feature-request Category: A feature request, i.e: not implemented / a PR. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Oct 17, 2024
@jieyouxu
Copy link
Member

#131838

workingjubilee added a commit to workingjubilee/rustc that referenced this issue Oct 19, 2024
bootstrap: allow setting `--jobs` in config.toml

Allow setting `--jobs` in config.toml's `[build]` section.

```toml
[build]
jobs = 0
```

If this is unset or set to zero in config.toml, we look at `--jobs` flag. If that is also unset, then we fallback to `std::thread::available_parallelism`. If that is not available, then we default to `1`. The flags and `available_parallelism` fallback are already setup, this PR just adds a config.toml option to wire that up.

Closes rust-lang#131836.

r? bootstrap
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Oct 19, 2024
bootstrap: allow setting `--jobs` in config.toml

Allow setting `--jobs` in config.toml's `[build]` section.

```toml
[build]
jobs = 0
```

If this is unset or set to zero in config.toml, we look at `--jobs` flag. If that is also unset, then we fallback to `std::thread::available_parallelism`. If that is not available, then we default to `1`. The flags and `available_parallelism` fallback are already setup, this PR just adds a config.toml option to wire that up.

Closes rust-lang#131836.

r? bootstrap
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Oct 19, 2024
bootstrap: allow setting `--jobs` in config.toml

Allow setting `--jobs` in config.toml's `[build]` section.

```toml
[build]
jobs = 0
```

If this is unset or set to zero in config.toml, we look at `--jobs` flag. If that is also unset, then we fallback to `std::thread::available_parallelism`. If that is not available, then we default to `1`. The flags and `available_parallelism` fallback are already setup, this PR just adds a config.toml option to wire that up.

Closes rust-lang#131836.

r? bootstrap
@bors bors closed this as completed in 21475b7 Oct 19, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Oct 19, 2024
Rollup merge of rust-lang#131838 - jieyouxu:boopjob, r=onur-ozkan

bootstrap: allow setting `--jobs` in config.toml

Allow setting `--jobs` in config.toml's `[build]` section.

```toml
[build]
jobs = 0
```

If this is unset or set to zero in config.toml, we look at `--jobs` flag. If that is also unset, then we fallback to `std::thread::available_parallelism`. If that is not available, then we default to `1`. The flags and `available_parallelism` fallback are already setup, this PR just adds a config.toml option to wire that up.

Closes rust-lang#131836.

r? bootstrap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants