Skip to content

Commit 51dcdcf

Browse files
authored
Merge branch 'master' into redox_builder
2 parents 7b8273c + d65e272 commit 51dcdcf

File tree

497 files changed

+6913
-3459
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

497 files changed

+6913
-3459
lines changed

Cargo.lock

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ dependencies = [
106106
"cfg-if 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
107107
"compiler_builtins 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
108108
"libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)",
109-
"rustc-demangle 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
109+
"rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
110110
"rustc-std-workspace-core 1.0.0",
111111
]
112112

@@ -1138,19 +1138,12 @@ dependencies = [
11381138

11391139
[[package]]
11401140
name = "hashbrown"
1141-
version = "0.4.0"
1141+
version = "0.5.0"
11421142
source = "registry+https://github.com/rust-lang/crates.io-index"
11431143
dependencies = [
11441144
"compiler_builtins 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
11451145
"rustc-std-workspace-alloc 1.0.0",
11461146
"rustc-std-workspace-core 1.0.0",
1147-
]
1148-
1149-
[[package]]
1150-
name = "hashbrown"
1151-
version = "0.5.0"
1152-
source = "registry+https://github.com/rust-lang/crates.io-index"
1153-
dependencies = [
11541147
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
11551148
]
11561149

@@ -2736,7 +2729,7 @@ dependencies = [
27362729

27372730
[[package]]
27382731
name = "rustc-demangle"
2739-
version = "0.1.15"
2732+
version = "0.1.16"
27402733
source = "registry+https://github.com/rust-lang/crates.io-index"
27412734
dependencies = [
27422735
"compiler_builtins 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2894,7 +2887,7 @@ dependencies = [
28942887
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
28952888
"punycode 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
28962889
"rustc 0.0.0",
2897-
"rustc-demangle 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
2890+
"rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
28982891
"rustc_data_structures 0.0.0",
28992892
"rustc_metadata 0.0.0",
29002893
"rustc_target 0.0.0",
@@ -3534,8 +3527,9 @@ dependencies = [
35343527
"core 0.0.0",
35353528
"dlmalloc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
35363529
"fortanix-sgx-abi 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
3537-
"hashbrown 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
3530+
"hashbrown 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
35383531
"libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)",
3532+
"hashbrown 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
35393533
"panic_abort 0.0.0",
35403534
"panic_unwind 0.0.0",
35413535
"profiler_builtins 0.0.0",
@@ -4450,7 +4444,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
44504444
"checksum globset 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ef4feaabe24a0a658fd9cf4a9acf6ed284f045c77df0f49020ba3245cfb7b454"
44514445
"checksum h2 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "a539b63339fbbb00e081e84b6e11bd1d9634a82d91da2984a18ac74a8823f392"
44524446
"checksum handlebars 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "df044dd42cdb7e32f28557b661406fc0f2494be75199779998810dbc35030e0d"
4453-
"checksum hashbrown 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9529213c67695ca2d146e6f263b7b72df8fa973368beadf767e8ed80c03f2f36"
44544447
"checksum hashbrown 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e1de41fb8dba9714efd92241565cdff73f78508c95697dd56787d3cba27e2353"
44554448
"checksum heck 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea04fa3ead4e05e51a7c806fc07271fdbde4e246a6c6d1efd52e72230b771b82"
44564449
"checksum hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77"
@@ -4600,7 +4593,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
46004593
"checksum rustc-ap-serialize 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "61673783f2089e01033ffa82d1988f55175402071b31253a358292e1624d4602"
46014594
"checksum rustc-ap-syntax 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "28f3dd1346d5b0269c07a4a78855e309a298ab569c9c1302d4d4f57f8eee4e84"
46024595
"checksum rustc-ap-syntax_pos 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "45e67b526dbda3a0c7dab91c8947d43685e7697f52686a4949da3c179cd7c979"
4603-
"checksum rustc-demangle 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "a7f4dccf6f4891ebcc0c39f9b6eb1a83b9bf5d747cb439ec6fba4f3b977038af"
4596+
"checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783"
46044597
"checksum rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7540fc8b0c49f096ee9c961cda096467dce8084bec6bdca2fc83895fd9b28cb8"
46054598
"checksum rustc-rayon 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0d2e07e19601f21c59aad953c2632172ba70cb27e685771514ea66e4062b3363"
46064599
"checksum rustc-rayon-core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "79d38ca7cbc22fa59f09d8534ea4b27f67b0facf0cbe274433aceea227a02543"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ then you may need to force rustbuild to use an older version. This can be done
144144
by manually calling the appropriate vcvars file before running the bootstrap.
145145
146146
```batch
147-
> CALL "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
147+
> CALL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
148148
> python x.py build
149149
```
150150

RELEASES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Language
2222
- [You can now use `_` as an identifier for consts.][61347] e.g. You can write
2323
`const _: u32 = 5;`.
2424
- [You can now use `#[repr(align(X)]` on enums.][61229]
25-
- [The `?`/_"Kleene"_ macro operator is now available in the
25+
- [The `?` Kleene macro operator is now available in the
2626
2015 edition.][60932]
2727

2828
Compiler

config.toml.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,10 @@
141141
# library and facade crates.
142142
#compiler-docs = false
143143

144-
# Indicate whether submodules are managed and updated automatically.
144+
# Indicate whether git submodules are managed and updated automatically.
145145
#submodules = true
146146

147-
# Update submodules only when the checked out commit in the submodules differs
147+
# Update git submodules only when the checked out commit in the submodules differs
148148
# from what is committed in the main rustc repo.
149149
#fast-submodules = true
150150

src/bootstrap/bin/rustc.rs

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -37,26 +37,14 @@ fn main() {
3737
let mut new = None;
3838
if let Some(current_as_str) = args[i].to_str() {
3939
if (&*args[i - 1] == "-C" && current_as_str.starts_with("metadata")) ||
40-
current_as_str.starts_with("-Cmetadata") {
40+
current_as_str.starts_with("-Cmetadata") {
4141
new = Some(format!("{}-{}", current_as_str, s));
4242
}
4343
}
4444
if let Some(new) = new { args[i] = new.into(); }
4545
}
4646
}
4747

48-
// Drop `--error-format json` because despite our desire for json messages
49-
// from Cargo we don't want any from rustc itself.
50-
if let Some(n) = args.iter().position(|n| n == "--error-format") {
51-
args.remove(n);
52-
args.remove(n);
53-
}
54-
55-
if let Some(s) = env::var_os("RUSTC_ERROR_FORMAT") {
56-
args.push("--error-format".into());
57-
args.push(s);
58-
}
59-
6048
// Detect whether or not we're a build script depending on whether --target
6149
// is passed (a bit janky...)
6250
let target = args.windows(2)
@@ -101,7 +89,7 @@ fn main() {
10189
if let Some(crate_name) = crate_name {
10290
if let Some(target) = env::var_os("RUSTC_TIME") {
10391
if target == "all" ||
104-
target.into_string().unwrap().split(",").any(|c| c.trim() == crate_name)
92+
target.into_string().unwrap().split(",").any(|c| c.trim() == crate_name)
10593
{
10694
cmd.arg("-Ztime");
10795
}
@@ -110,8 +98,17 @@ fn main() {
11098

11199
// Non-zero stages must all be treated uniformly to avoid problems when attempting to uplift
112100
// compiler libraries and such from stage 1 to 2.
101+
//
102+
// FIXME: the fact that core here is excluded is due to core_arch from our stdarch submodule
103+
// being broken on the beta compiler with bootstrap passed, so this is a temporary workaround
104+
// (we've just snapped, so there are no cfg(bootstrap) related annotations in core).
113105
if stage == "0" {
114-
cmd.arg("--cfg").arg("bootstrap");
106+
if crate_name != Some("core") {
107+
cmd.arg("--cfg").arg("bootstrap");
108+
} else {
109+
// NOTE(eddyb) see FIXME above, except now we need annotations again in core.
110+
cmd.arg("--cfg").arg("boostrap_stdarch_ignore_this");
111+
}
115112
}
116113

117114
// Print backtrace in case of ICE
@@ -132,10 +129,7 @@ fn main() {
132129
cmd.arg("-Dwarnings");
133130
cmd.arg("-Drust_2018_idioms");
134131
cmd.arg("-Dunused_lifetimes");
135-
// cfg(not(bootstrap)): Remove this during the next stage 0 compiler update.
136-
// `-Drustc::internal` is a new feature and `rustc_version` mis-reports the `stage`.
137-
let cfg_not_bootstrap = stage != "0" && crate_name != Some("rustc_version");
138-
if cfg_not_bootstrap && use_internal_lints(crate_name) {
132+
if use_internal_lints(crate_name) {
139133
cmd.arg("-Zunstable-options");
140134
cmd.arg("-Drustc::internal");
141135
}
@@ -287,10 +281,6 @@ fn main() {
287281
cmd.arg("-C").arg("target-feature=-crt-static");
288282
}
289283
}
290-
291-
if let Ok(map) = env::var("RUSTC_DEBUGINFO_MAP") {
292-
cmd.arg("--remap-path-prefix").arg(&map);
293-
}
294284
} else {
295285
// Override linker if necessary.
296286
if let Ok(host_linker) = env::var("RUSTC_HOST_LINKER") {
@@ -307,6 +297,10 @@ fn main() {
307297
}
308298
}
309299

300+
if let Ok(map) = env::var("RUSTC_DEBUGINFO_MAP") {
301+
cmd.arg("--remap-path-prefix").arg(&map);
302+
}
303+
310304
// Force all crates compiled by this compiler to (a) be unstable and (b)
311305
// allow the `rustc_private` feature to link to other unstable crates
312306
// also in the sysroot. We also do this for host crates, since those

src/bootstrap/builder.rs

Lines changed: 23 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ impl StepDescription {
145145
only_hosts: S::ONLY_HOSTS,
146146
should_run: S::should_run,
147147
make_run: S::make_run,
148-
name: unsafe { ::std::intrinsics::type_name::<S>() },
148+
name: std::any::type_name::<S>(),
149149
}
150150
}
151151

@@ -754,76 +754,20 @@ impl<'a> Builder<'a> {
754754
let mut cargo = Command::new(&self.initial_cargo);
755755
let out_dir = self.stage_out(compiler, mode);
756756

757-
// command specific path, we call clear_if_dirty with this
758-
let mut my_out = match cmd {
759-
"build" => self.cargo_out(compiler, mode, target),
760-
761-
// This is the intended out directory for crate documentation.
762-
"doc" | "rustdoc" => self.crate_doc_out(target),
763-
764-
_ => self.stage_out(compiler, mode),
765-
};
766-
767-
// This is for the original compiler, but if we're forced to use stage 1, then
768-
// std/test/rustc stamps won't exist in stage 2, so we need to get those from stage 1, since
769-
// we copy the libs forward.
770-
let cmp = self.compiler_for(compiler.stage, compiler.host, target);
771-
772-
let libstd_stamp = match cmd {
773-
"check" | "clippy" | "fix" => check::libstd_stamp(self, cmp, target),
774-
_ => compile::libstd_stamp(self, cmp, target),
775-
};
776-
777-
let libtest_stamp = match cmd {
778-
"check" | "clippy" | "fix" => check::libtest_stamp(self, cmp, target),
779-
_ => compile::libtest_stamp(self, cmp, target),
780-
};
781-
782-
let librustc_stamp = match cmd {
783-
"check" | "clippy" | "fix" => check::librustc_stamp(self, cmp, target),
784-
_ => compile::librustc_stamp(self, cmp, target),
785-
};
757+
// Codegen backends are not yet tracked by -Zbinary-dep-depinfo,
758+
// so we need to explicitly clear out if they've been updated.
759+
for backend in self.codegen_backends(compiler) {
760+
self.clear_if_dirty(&out_dir, &backend);
761+
}
786762

787763
if cmd == "doc" || cmd == "rustdoc" {
788-
if mode == Mode::Rustc || mode == Mode::ToolRustc || mode == Mode::Codegen {
764+
let my_out = match mode {
789765
// This is the intended out directory for compiler documentation.
790-
my_out = self.compiler_doc_out(target);
791-
}
766+
Mode::Rustc | Mode::ToolRustc | Mode::Codegen => self.compiler_doc_out(target),
767+
_ => self.crate_doc_out(target),
768+
};
792769
let rustdoc = self.rustdoc(compiler);
793770
self.clear_if_dirty(&my_out, &rustdoc);
794-
} else if cmd != "test" {
795-
match mode {
796-
Mode::Std => {
797-
self.clear_if_dirty(&my_out, &self.rustc(compiler));
798-
for backend in self.codegen_backends(compiler) {
799-
self.clear_if_dirty(&my_out, &backend);
800-
}
801-
},
802-
Mode::Test => {
803-
self.clear_if_dirty(&my_out, &libstd_stamp);
804-
},
805-
Mode::Rustc => {
806-
self.clear_if_dirty(&my_out, &self.rustc(compiler));
807-
self.clear_if_dirty(&my_out, &libstd_stamp);
808-
self.clear_if_dirty(&my_out, &libtest_stamp);
809-
},
810-
Mode::Codegen => {
811-
self.clear_if_dirty(&my_out, &librustc_stamp);
812-
},
813-
Mode::ToolBootstrap => { },
814-
Mode::ToolStd => {
815-
self.clear_if_dirty(&my_out, &libstd_stamp);
816-
},
817-
Mode::ToolTest => {
818-
self.clear_if_dirty(&my_out, &libstd_stamp);
819-
self.clear_if_dirty(&my_out, &libtest_stamp);
820-
},
821-
Mode::ToolRustc => {
822-
self.clear_if_dirty(&my_out, &libstd_stamp);
823-
self.clear_if_dirty(&my_out, &libtest_stamp);
824-
self.clear_if_dirty(&my_out, &librustc_stamp);
825-
},
826-
}
827771
}
828772

829773
cargo
@@ -861,6 +805,19 @@ impl<'a> Builder<'a> {
861805
},
862806
}
863807

808+
// This tells Cargo (and in turn, rustc) to output more complete
809+
// dependency information. Most importantly for rustbuild, this
810+
// includes sysroot artifacts, like libstd, which means that we don't
811+
// need to track those in rustbuild (an error prone process!). This
812+
// feature is currently unstable as there may be some bugs and such, but
813+
// it represents a big improvement in rustbuild's reliability on
814+
// rebuilds, so we're using it here.
815+
//
816+
// For some additional context, see #63470 (the PR originally adding
817+
// this), as well as #63012 which is the tracking issue for this
818+
// feature on the rustc side.
819+
cargo.arg("-Zbinary-dep-depinfo");
820+
864821
cargo.arg("-j").arg(self.jobs().to_string());
865822
// Remove make-related flags to ensure Cargo can correctly set things up
866823
cargo.env_remove("MAKEFLAGS");
@@ -980,9 +937,6 @@ impl<'a> Builder<'a> {
980937
if let Some(target_linker) = self.linker(target) {
981938
cargo.env("RUSTC_TARGET_LINKER", target_linker);
982939
}
983-
if let Some(ref error_format) = self.config.rustc_error_format {
984-
cargo.env("RUSTC_ERROR_FORMAT", error_format);
985-
}
986940
if !(["build", "check", "clippy", "fix", "rustc"].contains(&cmd)) && want_rustdoc {
987941
cargo.env("RUSTDOC_LIBDIR", self.rustc_libdir(compiler));
988942
}

src/bootstrap/cc_detect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ fn cc2ar(cc: &Path, target: &str) -> Option<PathBuf> {
4646
} else if target.contains("openbsd") {
4747
Some(PathBuf::from("ar"))
4848
} else if target.contains("vxworks") {
49-
Some(PathBuf::from("vx-ar"))
49+
Some(PathBuf::from("wr-ar"))
5050
} else {
5151
let parent = cc.parent().unwrap();
5252
let file = cc.file_name().unwrap().to_str().unwrap();

src/bootstrap/channel.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use build_helper::output;
1313
use crate::Build;
1414

1515
// The version number
16-
pub const CFG_RELEASE_NUM: &str = "1.38.0";
16+
pub const CFG_RELEASE_NUM: &str = "1.39.0";
1717

1818
pub struct GitInfo {
1919
inner: Option<Info>,

src/bootstrap/check.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,6 @@ impl Step for Rustdoc {
245245
let libdir = builder.sysroot_libdir(compiler, target);
246246
let hostdir = builder.sysroot_libdir(compiler, compiler.host);
247247
add_to_sysroot(&builder, &libdir, &hostdir, &rustdoc_stamp(builder, compiler, target));
248-
builder.cargo(compiler, Mode::ToolRustc, target, "clean");
249248
}
250249
}
251250

0 commit comments

Comments
 (0)