Skip to content

Commit c5e4148

Browse files
committed
Auto merge of #93719 - scottmcm:core-as-2021-everywhere, r=Mark-Simulacrum
Build libcore as 2021 in a few more places The `Cargo.toml` has `edition = "2021"` (as of #92068), so that's what these command lines should use too.
2 parents 926e784 + d91e7a3 commit c5e4148

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

library/core/Cargo.toml

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ repository = "https://github.com/rust-lang/rust.git"
66
description = "The Rust Core Library"
77
autotests = false
88
autobenches = false
9+
# If you update this, be sure to update it in a bunch of other places too!
10+
# As of 2022, it was the ci/pgo.sh script and the core-no-fp-fmt-parse test.
911
edition = "2021"
1012

1113
[lib]

src/ci/pgo.sh

+8-8
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ python3 ../x.py build --target=$PGO_HOST --host=$PGO_HOST \
1414
--llvm-profile-generate
1515

1616
# Profile libcore compilation in opt-level=0 and opt-level=3
17-
RUSTC_BOOTSTRAP=1 ./build/$PGO_HOST/stage2/bin/rustc --edition=2018 \
18-
--crate-type=lib ../library/core/src/lib.rs
19-
RUSTC_BOOTSTRAP=1 ./build/$PGO_HOST/stage2/bin/rustc --edition=2018 \
20-
--crate-type=lib -Copt-level=3 ../library/core/src/lib.rs
17+
RUSTC_BOOTSTRAP=1 ./build/$PGO_HOST/stage2/bin/rustc \
18+
--edition=2021 --crate-type=lib ../library/core/src/lib.rs
19+
RUSTC_BOOTSTRAP=1 ./build/$PGO_HOST/stage2/bin/rustc \
20+
--edition=2021 --crate-type=lib -Copt-level=3 ../library/core/src/lib.rs
2121

2222
# Merge the profile data we gathered for LLVM
2323
# Note that this uses the profdata from the clang we used to build LLVM,
@@ -37,10 +37,10 @@ python3 ../x.py build --target=$PGO_HOST --host=$PGO_HOST \
3737
--rust-profile-generate=/tmp/rustc-pgo
3838

3939
# Profile libcore compilation in opt-level=0 and opt-level=3
40-
RUSTC_BOOTSTRAP=1 ./build/$PGO_HOST/stage2/bin/rustc --edition=2018 \
41-
--crate-type=lib ../library/core/src/lib.rs
42-
RUSTC_BOOTSTRAP=1 ./build/$PGO_HOST/stage2/bin/rustc --edition=2018 \
43-
--crate-type=lib -Copt-level=3 ../library/core/src/lib.rs
40+
RUSTC_BOOTSTRAP=1 ./build/$PGO_HOST/stage2/bin/rustc \
41+
--edition=2021 --crate-type=lib ../library/core/src/lib.rs
42+
RUSTC_BOOTSTRAP=1 ./build/$PGO_HOST/stage2/bin/rustc \
43+
--edition=2021 --crate-type=lib -Copt-level=3 ../library/core/src/lib.rs
4444

4545
cp -r /tmp/rustc-perf ./
4646
chown -R $(whoami): ./rustc-perf
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
-include ../tools.mk
22

33
all:
4-
$(RUSTC) --edition=2018 --crate-type=rlib ../../../../library/core/src/lib.rs --cfg no_fp_fmt_parse
4+
$(RUSTC) --edition=2021 --crate-type=rlib ../../../../library/core/src/lib.rs --cfg no_fp_fmt_parse

0 commit comments

Comments
 (0)