Skip to content

Rename jemalloc bootstrap options to override-allocator#155617

Open
Zoxc wants to merge 1 commit intorust-lang:mainfrom
Zoxc:allocator-feature-rename
Open

Rename jemalloc bootstrap options to override-allocator#155617
Zoxc wants to merge 1 commit intorust-lang:mainfrom
Zoxc:allocator-feature-rename

Conversation

@Zoxc
Copy link
Copy Markdown
Contributor

@Zoxc Zoxc commented Apr 21, 2026

I want to make use of mimalloc on Windows so this renames jemalloc bootstrap options to override-allocator so we can reuse the same flag for this purpose.

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 21, 2026

The Miri subtree was changed

cc @rust-lang/miri

Warning

If you are changing how CI LLVM is built or linked, make sure to bump
src/bootstrap/download-ci-llvm-stamp.

cc @jieyouxu

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

This PR modifies src/bootstrap/src/core/config.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

This PR modifies bootstrap.example.toml.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

The rustc-dev-guide subtree was changed. If this PR only touches the dev guide consider submitting a PR directly to rust-lang/rustc-dev-guide otherwise thank you for updating the dev guide with your changes.

cc @BoxyUwU, @tshepang

@rustbot rustbot added A-CI Area: Our Github Actions CI A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Apr 21, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 21, 2026

r? @jieyouxu

rustbot has assigned @jieyouxu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: bootstrap
  • bootstrap expanded to 6 candidates
  • Random selection from Mark-Simulacrum, clubby789, jieyouxu

@Zoxc Zoxc force-pushed the allocator-feature-rename branch from 0213b60 to 0946ab6 Compare April 21, 2026 20:29
@rust-log-analyzer

This comment has been minimized.

@Zoxc Zoxc force-pushed the allocator-feature-rename branch from 0946ab6 to fc5ac40 Compare April 21, 2026 20:48
@rust-log-analyzer

This comment has been minimized.

/// above, instead of via Cargo as you'd normally do. This is currently needed for LTO due to
/// <https://github.com/rust-lang/cc-rs/issues/1613>.
#[cfg(feature = "jemalloc")]
#[cfg(feature = "override_allocator")]
Copy link
Copy Markdown
Contributor

@ada4a ada4a Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is right, because this imports tikv_jemalloc_sys specifically. But I don't know anything about this – maybe the comments above the import will be able to help you

View changes since the review

@Zoxc Zoxc force-pushed the allocator-feature-rename branch from fc5ac40 to 11c97bb Compare April 21, 2026 21:30
Using a different memory allocator for `rustc` can provide significant performance benefits.
If you want to enable the `jemalloc` allocator, you can set the `rust.jemalloc` option to `true`
in `bootstrap.toml`:
If you want to enable the jemalloc allocator, you can set the `rust.override-allocator` option to `true`
Copy link
Copy Markdown
Member

@tshepang tshepang Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you want to enable the jemalloc allocator, you can set the `rust.override-allocator` option to `true`
If you want to enable the jemalloc allocator, you can set the `rust.override-allocator` option to `true`:

View changes since the review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants