Skip to content

Commit

Permalink
Auto merge of #93719 - scottmcm:core-as-2021-everywhere, r=Mark-Simul…
Browse files Browse the repository at this point in the history
…acrum

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.
  • Loading branch information
bors committed Feb 7, 2022
2 parents 926e784 + d91e7a3 commit c5e4148
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions library/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ repository = "https://github.com/rust-lang/rust.git"
description = "The Rust Core Library"
autotests = false
autobenches = false
# If you update this, be sure to update it in a bunch of other places too!
# As of 2022, it was the ci/pgo.sh script and the core-no-fp-fmt-parse test.
edition = "2021"

[lib]
Expand Down
16 changes: 8 additions & 8 deletions src/ci/pgo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ python3 ../x.py build --target=$PGO_HOST --host=$PGO_HOST \
--llvm-profile-generate

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

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

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

cp -r /tmp/rustc-perf ./
chown -R $(whoami): ./rustc-perf
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-make-fulldeps/core-no-fp-fmt-parse/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-include ../tools.mk

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

0 comments on commit c5e4148

Please sign in to comment.