diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs
index c022285211fab..968d9befed0b3 100644
--- a/src/bootstrap/src/core/build_steps/dist.rs
+++ b/src/bootstrap/src/core/build_steps/dist.rs
@@ -1870,7 +1870,7 @@ impl Step for Extended {
.arg("-out")
.arg(&output)
.arg(input);
- add_env(builder, &mut cmd, target);
+ add_env(builder, &mut cmd, target, &built_tools);
if built_tools.contains("clippy") {
cmd.arg("-dClippyDir=clippy");
@@ -1974,7 +1974,14 @@ impl Step for Extended {
}
}
-fn add_env(builder: &Builder<'_>, cmd: &mut BootstrapCommand, target: TargetSelection) {
+fn add_env(
+ builder: &Builder<'_>,
+ cmd: &mut BootstrapCommand,
+ target: TargetSelection,
+ built_tools: &HashSet<&'static str>,
+) {
+ // envs for wix should be always defined, even if not used
+ // FIXME: is they affect ccache?
let mut parts = builder.version.split('.');
cmd.env("CFG_RELEASE_INFO", builder.rust_version())
.env("CFG_RELEASE_NUM", &builder.version)
@@ -1995,6 +2002,27 @@ fn add_env(builder: &Builder<'_>, cmd: &mut BootstrapCommand, target: TargetSele
} else {
cmd.env("CFG_MINGW", "0").env("CFG_ABI", "MSVC");
}
+
+ if built_tools.contains("rustfmt") {
+ cmd.env("CFG_RUSTFMT", "1");
+ } else {
+ cmd.env("CFG_RUSTFMT", "0");
+ }
+ if built_tools.contains("clippy") {
+ cmd.env("CFG_CLIPPY", "1");
+ } else {
+ cmd.env("CFG_CLIPPY", "0");
+ }
+ if built_tools.contains("miri") {
+ cmd.env("CFG_MIRI", "1");
+ } else {
+ cmd.env("CFG_MIRI", "0");
+ }
+ if built_tools.contains("rust-analyzer") {
+ cmd.env("CFG_RA", "1");
+ } else {
+ cmd.env("CFG_RA", "0");
+ }
}
fn install_llvm_file(
diff --git a/src/ci/run.sh b/src/ci/run.sh
index 5690d8edea6a2..ec899ca6a3482 100755
--- a/src/ci/run.sh
+++ b/src/ci/run.sh
@@ -279,5 +279,6 @@ if [ "$RUN_CHECK_WITH_PARALLEL_QUERIES" != "" ]; then
fi
echo "::group::sccache stats"
+sccache --version || true
sccache --show-stats || true
echo "::endgroup::"
diff --git a/src/ci/scripts/install-sccache.sh b/src/ci/scripts/install-sccache.sh
index e143152f330cf..a507dddb51033 100755
--- a/src/ci/scripts/install-sccache.sh
+++ b/src/ci/scripts/install-sccache.sh
@@ -12,7 +12,9 @@ if isMacOS; then
chmod +x /usr/local/bin/sccache
elif isWindows; then
mkdir -p sccache
- curl -fo sccache/sccache.exe "${MIRRORS_BASE}/2018-04-26-sccache-x86_64-pc-windows-msvc"
+ curl -fLo sccache.tar.gz "https://github.com/mozilla/sccache/releases/download/v0.7.7/sccache-v0.7.7-x86_64-pc-windows-msvc.tar.gz"
+ tar zxvf sccache.tar.gz --wildcards --no-anchored 'sccache.exe' --strip-components=1
+ mv sccache.exe sccache
ciCommandAddPath "$(pwd)/sccache"
fi
diff --git a/src/etc/installer/msi/rust.wxs b/src/etc/installer/msi/rust.wxs
index 2d155bf0b1019..64cceccc97582 100644
--- a/src/etc/installer/msi/rust.wxs
+++ b/src/etc/installer/msi/rust.wxs
@@ -172,11 +172,19 @@
-
-
-
+
+
+
+
+
+
+
+
+
-
+
+
+
@@ -284,34 +292,42 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+