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

Clean up some FIXME notes on bootstrap #134650

Merged
merged 3 commits into from
Dec 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions src/bootstrap/src/core/config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,6 @@ define_config! {
debuginfo_level_tests: Option<DebuginfoLevel> = "debuginfo-level-tests",
backtrace: Option<bool> = "backtrace",
incremental: Option<bool> = "incremental",
parallel_compiler: Option<bool> = "parallel-compiler",
default_linker: Option<String> = "default-linker",
channel: Option<String> = "channel",
description: Option<String> = "description",
Expand Down Expand Up @@ -1764,7 +1763,6 @@ impl Config {
debuginfo_level_tests: debuginfo_level_tests_toml,
backtrace,
incremental,
parallel_compiler,
randomize_layout,
default_linker,
channel: _, // already handled above
Expand Down Expand Up @@ -1874,13 +1872,6 @@ impl Config {
config.rust_randomize_layout = randomize_layout.unwrap_or_default();
config.llvm_tools_enabled = llvm_tools.unwrap_or(true);

// FIXME: Remove this option at the end of 2024.
if parallel_compiler.is_some() {
println!(
"WARNING: The `rust.parallel-compiler` option is deprecated and does nothing. The parallel compiler (with one thread) is now the default"
);
}

config.llvm_enzyme =
llvm_enzyme.unwrap_or(config.channel == "dev" || config.channel == "nightly");
config.rustc_default_linker = default_linker;
Expand Down Expand Up @@ -3222,7 +3213,6 @@ fn check_incompatible_options_for_ci_rustc(
debuginfo_level_tools: _,
debuginfo_level_tests: _,
backtrace: _,
parallel_compiler: _,
musl_root: _,
verbose_tests: _,
optimize_tests: _,
Expand Down
3 changes: 1 addition & 2 deletions src/bootstrap/src/core/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,7 @@ impl Config {
if !path_is_dylib(fname) {
// Finally, set the correct .interp for binaries
let dynamic_linker_path = nix_deps_dir.join("nix-support/dynamic-linker");
// FIXME: can we support utf8 here? `args` doesn't accept Vec<u8>, only OsString ...
let dynamic_linker = t!(String::from_utf8(t!(fs::read(dynamic_linker_path))));
let dynamic_linker = t!(fs::read_to_string(dynamic_linker_path));
patchelf.args(["--set-interpreter", dynamic_linker.trim_end()]);
}

Expand Down
5 changes: 3 additions & 2 deletions src/bootstrap/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -635,11 +635,12 @@ impl Build {
if self.config.backtrace {
features.insert("backtrace");
}

if self.config.profiler_enabled(target) {
features.insert("profiler");
}
// Generate memcpy, etc. FIXME: Remove this once compiler-builtins
// automatically detects this target.

// If zkvm target, generate memcpy, etc.
Comment on lines -641 to +643
Copy link
Member Author

Choose a reason for hiding this comment

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

This was asked on the PR for clarity, but no response has been provided.

Copy link
Member

@jieyouxu jieyouxu Dec 22, 2024

Choose a reason for hiding this comment

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

cc riscv32im-risc0-zkvm-elf target maintainers @flaub, @jbruestle and @SchmErik: could you elaborate why this is needed or if this is still needed?

Note that riscv32im-risc0-zkvm-elf is a Tier 3 compiler target, and while we would like to avoid unnecessarily breaking stuff we don't have to, we don't offer any guarantees that it will build. We'd like to trim down complexity in the bootstrap codebase where possible, because it's already very very complex.

if target.contains("zkvm") {
features.insert("compiler-builtins-mem");
}
Expand Down
5 changes: 5 additions & 0 deletions src/bootstrap/src/utils/change_tracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,4 +320,9 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
severity: ChangeSeverity::Warning,
summary: "compiletest now takes `--no-capture` instead of `--nocapture`; bootstrap now accepts `--no-capture` as an argument to test commands directly",
},
ChangeInfo {
change_id: 134650,
severity: ChangeSeverity::Warning,
summary: "Removed `rust.parallel-compiler` as it was deprecated in #132282 long time ago.",
},
];
Loading