Skip to content

Commit cd87439

Browse files
committed
Auto merge of rust-lang#133033 - klensy:win.dot, r=<try>
turn creating 8dot3 names off for windows for speed r? `@ghost` try-job: dist-x86_64-msvc
2 parents bf6adec + 6eecb1e commit cd87439

File tree

4 files changed

+82
-35
lines changed

4 files changed

+82
-35
lines changed

src/bootstrap/src/core/build_steps/dist.rs

+30-2
Original file line numberDiff line numberDiff line change
@@ -1870,7 +1870,7 @@ impl Step for Extended {
18701870
.arg("-out")
18711871
.arg(&output)
18721872
.arg(input);
1873-
add_env(builder, &mut cmd, target);
1873+
add_env(builder, &mut cmd, target, &built_tools);
18741874

18751875
if built_tools.contains("clippy") {
18761876
cmd.arg("-dClippyDir=clippy");
@@ -1974,7 +1974,14 @@ impl Step for Extended {
19741974
}
19751975
}
19761976

1977-
fn add_env(builder: &Builder<'_>, cmd: &mut BootstrapCommand, target: TargetSelection) {
1977+
fn add_env(
1978+
builder: &Builder<'_>,
1979+
cmd: &mut BootstrapCommand,
1980+
target: TargetSelection,
1981+
built_tools: &HashSet<&'static str>,
1982+
) {
1983+
// envs for wix should be always defined, even if not used
1984+
// FIXME: is they affect ccache?
19781985
let mut parts = builder.version.split('.');
19791986
cmd.env("CFG_RELEASE_INFO", builder.rust_version())
19801987
.env("CFG_RELEASE_NUM", &builder.version)
@@ -1995,6 +2002,27 @@ fn add_env(builder: &Builder<'_>, cmd: &mut BootstrapCommand, target: TargetSele
19952002
} else {
19962003
cmd.env("CFG_MINGW", "0").env("CFG_ABI", "MSVC");
19972004
}
2005+
2006+
if built_tools.contains("rustfmt") {
2007+
cmd.env("CFG_RUSTFMT", "1");
2008+
} else {
2009+
cmd.env("CFG_RUSTFMT", "0");
2010+
}
2011+
if built_tools.contains("clippy") {
2012+
cmd.env("CFG_CLIPPY", "1");
2013+
} else {
2014+
cmd.env("CFG_CLIPPY", "0");
2015+
}
2016+
if built_tools.contains("miri") {
2017+
cmd.env("CFG_MIRI", "1");
2018+
} else {
2019+
cmd.env("CFG_MIRI", "0");
2020+
}
2021+
if built_tools.contains("rust-analyzer") {
2022+
cmd.env("CFG_RA", "1");
2023+
} else {
2024+
cmd.env("CFG_RA", "0");
2025+
}
19982026
}
19992027

20002028
fn install_llvm_file(

src/ci/run.sh

+1
Original file line numberDiff line numberDiff line change
@@ -279,5 +279,6 @@ if [ "$RUN_CHECK_WITH_PARALLEL_QUERIES" != "" ]; then
279279
fi
280280

281281
echo "::group::sccache stats"
282+
sccache --version || true
282283
sccache --show-stats || true
283284
echo "::endgroup::"

src/ci/scripts/install-sccache.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ if isMacOS; then
1212
chmod +x /usr/local/bin/sccache
1313
elif isWindows; then
1414
mkdir -p sccache
15-
curl -fo sccache/sccache.exe "${MIRRORS_BASE}/2018-04-26-sccache-x86_64-pc-windows-msvc"
15+
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"
16+
tar zxvf sccache.tar.gz --wildcards --no-anchored 'sccache.exe' --strip-components=1
17+
mv sccache.exe sccache
1618
ciCommandAddPath "$(pwd)/sccache"
1719
fi
1820

src/etc/installer/msi/rust.wxs

+48-32
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,19 @@
172172
<!-- tool-rust-docs-end -->
173173
<Directory Id="Cargo" Name="." />
174174
<Directory Id="Std" Name="." />
175-
<Directory Id="RustFmt" Name="." />
176-
<Directory Id="RustAnalyzer" Name="." />
177-
<Directory Id="Miri" Name="." />
175+
<?if $(env.CFG_RUSTFMT)="1" ?>
176+
<Directory Id="RustFmt" Name="." />
177+
<?endif?>
178+
<?if $(env.CFG_RA)="1" ?>
179+
<Directory Id="RustAnalyzer" Name="." />
180+
<?endif?>
181+
<?if $(env.CFG_MIRI)="1" ?>
182+
<Directory Id="Miri" Name="." />
183+
<?endif?>
178184
<Directory Id="Analysis" Name="." />
179-
<Directory Id="Clippy" Name="." />
185+
<?if $(env.CFG_CLIPPY)="1" ?>
186+
<Directory Id="Clippy" Name="." />
187+
<?endif?>
180188
</Directory>
181189
</Directory>
182190

@@ -284,34 +292,42 @@
284292
<ComponentRef Id="PathEnvPerMachine" />
285293
<ComponentRef Id="PathEnvPerUser" />
286294
</Feature>
287-
<Feature Id="RustFmt"
288-
Title="Formatter for rust"
289-
Display="7"
290-
Level="1"
291-
AllowAdvertise="no">
292-
<ComponentGroupRef Id="RustFmtGroup" />
293-
</Feature>
294-
<Feature Id="Clippy"
295-
Title="Formatter and checker for rust"
296-
Display="8"
297-
Level="1"
298-
AllowAdvertise="no">
299-
<ComponentGroupRef Id="ClippyGroup" />
300-
</Feature>
301-
<Feature Id="Miri"
302-
Title="Soundness checker for rust"
303-
Display="9"
304-
Level="1"
305-
AllowAdvertise="no">
306-
<ComponentGroupRef Id="MiriGroup" />
307-
</Feature>
308-
<Feature Id="RustAnalyzer"
309-
Title="Analyzer for rust"
310-
Display="10"
311-
Level="1"
312-
AllowAdvertise="no">
313-
<ComponentGroupRef Id="RustAnalyzerGroup" />
314-
</Feature>
295+
<?if $(env.CFG_RUSTFMT)="1" ?>
296+
<Feature Id="RustFmt"
297+
Title="Formatter for rust"
298+
Display="7"
299+
Level="1"
300+
AllowAdvertise="no">
301+
<ComponentGroupRef Id="RustFmtGroup" />
302+
</Feature>
303+
<?endif?>
304+
<?if $(env.CFG_CLIPPY)="1" ?>
305+
<Feature Id="Clippy"
306+
Title="Formatter and checker for rust"
307+
Display="8"
308+
Level="1"
309+
AllowAdvertise="no">
310+
<ComponentGroupRef Id="ClippyGroup" />
311+
</Feature>
312+
<?endif?>
313+
<?if $(env.CFG_MIRI)="1" ?>
314+
<Feature Id="Miri"
315+
Title="Soundness checker for rust"
316+
Display="9"
317+
Level="1"
318+
AllowAdvertise="no">
319+
<ComponentGroupRef Id="MiriGroup" />
320+
</Feature>
321+
<?endif?>
322+
<?if $(env.CFG_RA)="1" ?>
323+
<Feature Id="RustAnalyzer"
324+
Title="Analyzer for rust"
325+
Display="10"
326+
Level="1"
327+
AllowAdvertise="no">
328+
<ComponentGroupRef Id="RustAnalyzerGroup" />
329+
</Feature>
330+
<?endif?>
315331
<Feature Id="Analysis"
316332
Title="Analysis for rust"
317333
Display="11"

0 commit comments

Comments
 (0)