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

Rollup of 8 pull requests #83848

Closed
wants to merge 19 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
e7f340e
BTree: move blocks around in node.rs
ssomers Feb 16, 2021
7f5964a
Add `download-rustc = "if-unchanged"`
jyn514 Mar 22, 2021
4f73d21
Fix compiletest on FreeBSD
asomers Mar 26, 2021
617e135
rustdoc: highlight macros more efficiently
notriddle Mar 15, 2021
f64038f
rustdoc: update macro highlight tests
notriddle Apr 3, 2021
8a05892
List trait impls before methods from deref in the sidebar of Rustdoc'…
slightlyoutofphase Apr 3, 2021
72502e8
Remove trailing whitespace
slightlyoutofphase Apr 3, 2021
13e482b
Remove unneeded INITIAL_IDS const
GuillaumeGomez Apr 3, 2021
3bd241f
cleanup leak after test to make miri happy
the8472 Apr 2, 2021
572873f
suggestion from review
the8472 Apr 3, 2021
a41d41c
Fix error codes check run and ensure it will not go unnoticed again
GuillaumeGomez Mar 24, 2021
92593a0
Rollup merge of #82726 - ssomers:btree_node_rearange, r=Mark-Simulacrum
GuillaumeGomez Apr 4, 2021
a604464
Rollup merge of #83368 - jyn514:download-if-unchanged, r=Mark-Simulacrum
GuillaumeGomez Apr 4, 2021
54b5f02
Rollup merge of #83451 - GuillaumeGomez:fix-error-code-tidy-check, r=…
GuillaumeGomez Apr 4, 2021
9a84a0c
Rollup merge of #83532 - asomers:gdb-fbsd, r=Mark-Simulacrum
GuillaumeGomez Apr 4, 2021
96659a9
Rollup merge of #83793 - notriddle:single-span-macro-highlight, r=Gui…
GuillaumeGomez Apr 4, 2021
4757d94
Rollup merge of #83809 - GuillaumeGomez:remove-initial-ids, r=camelid
GuillaumeGomez Apr 4, 2021
8e37df4
Rollup merge of #83826 - slightlyoutofphase:rustdoc-sidebar-order-shu…
GuillaumeGomez Apr 4, 2021
e00fb1c
Rollup merge of #83827 - the8472:fix-inplace-panic-on-drop, r=RalfJung
GuillaumeGomez Apr 4, 2021
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
Prev Previous commit
Next Next commit
Add download-rustc = "if-unchanged"
This allows keeping the setting to a fixed value without having to
toggle it when you want to work on the compiler instead of on tools.
jyn514 committed Mar 22, 2021
commit 7f5964a5e7eccd3f9191b16da4f7a7662489de74
4 changes: 3 additions & 1 deletion config.toml.example
Original file line number Diff line number Diff line change
@@ -372,7 +372,9 @@ changelog-seen = 2
# Whether to download the stage 1 and 2 compilers from CI.
# This is mostly useful for tools; if you have changes to `compiler/` they will be ignored.
#
# FIXME: currently, this also uses the downloaded compiler for stage0, but that causes unnecessary rebuilds.
# You can set this to "if-unchanged" to only download if `compiler/` has not been modified.
#
# FIXME(#82739): currently, this also uses the downloaded compiler for stage0, but that causes unnecessary rebuilds.
#download-rustc = false

# Number of codegen units to use for each compiler invocation. A value of 0
8 changes: 7 additions & 1 deletion src/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
@@ -638,8 +638,10 @@ def fix_bin_or_dylib(self, fname, rpath_libz=False):
# Return the stage1 compiler to download, if any.
def maybe_download_rustc(self):
# If `download-rustc` is not set, default to rebuilding.
if self.get_toml("download-rustc", section="rust") != "true":
download_rustc = self.get_toml("download-rustc", section="rust")
if download_rustc is None or download_rustc == "false":
return None
assert download_rustc == "true" or download_rustc == "if-unchanged", download_rustc

# Handle running from a directory other than the top level
rev_parse = ["git", "rev-parse", "--show-toplevel"]
@@ -654,6 +656,8 @@ def maybe_download_rustc(self):
# Warn if there were changes to the compiler since the ancestor commit.
status = subprocess.call(["git", "diff-index", "--quiet", commit, "--", compiler])
if status != 0:
if download_rustc == "if-unchanged":
return None
print("warning: `download-rustc` is enabled, but there are changes to compiler/")

return commit
@@ -1158,6 +1162,8 @@ def bootstrap(help_triggered):
env["RUSTC_BOOTSTRAP"] = '1'
if toml_path:
env["BOOTSTRAP_CONFIG"] = toml_path
if build.rustc_commit is not None:
env["BOOTSTRAP_DOWNLOAD_RUSTC"] = '1'
run(args, env=env, verbose=build.verbose)


4 changes: 2 additions & 2 deletions src/bootstrap/config.rs
Original file line number Diff line number Diff line change
@@ -510,7 +510,7 @@ struct Rust {
new_symbol_mangling: Option<bool>,
profile_generate: Option<String>,
profile_use: Option<String>,
download_rustc: Option<bool>,
download_rustc: Option<String>,
}

/// TOML representation of how each build target is configured.
@@ -897,7 +897,7 @@ impl Config {
config.rust_codegen_units_std = rust.codegen_units_std.map(threads_from_config);
config.rust_profile_use = flags.rust_profile_use.or(rust.profile_use);
config.rust_profile_generate = flags.rust_profile_generate.or(rust.profile_generate);
config.download_rustc = rust.download_rustc.unwrap_or(false);
config.download_rustc = env::var("BOOTSTRAP_DOWNLOAD_RUSTC").as_deref() == Ok("1");
} else {
config.rust_profile_use = flags.rust_profile_use;
config.rust_profile_generate = flags.rust_profile_generate;