Skip to content

Commit

Permalink
Auto merge of rust-lang#133033 - klensy:win.dot, r=<try>
Browse files Browse the repository at this point in the history
turn creating 8dot3 names off for windows for speed

r? `@ghost`

try-job: dist-x86_64-msvc
  • Loading branch information
bors committed Nov 17, 2024
2 parents 1e0df74 + 1ec62a3 commit 49ca183
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 35 deletions.
32 changes: 30 additions & 2 deletions src/bootstrap/src/core/build_steps/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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)
Expand All @@ -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(
Expand Down
1 change: 1 addition & 0 deletions src/ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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::"
4 changes: 3 additions & 1 deletion src/ci/scripts/install-sccache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.4.2/sccache-v0.4.2-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

Expand Down
80 changes: 48 additions & 32 deletions src/etc/installer/msi/rust.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,19 @@
<!-- tool-rust-docs-end -->
<Directory Id="Cargo" Name="." />
<Directory Id="Std" Name="." />
<Directory Id="RustFmt" Name="." />
<Directory Id="RustAnalyzer" Name="." />
<Directory Id="Miri" Name="." />
<?if $(env.CFG_RUSTFMT)="1" ?>
<Directory Id="RustFmt" Name="." />
<?endif?>
<?if $(env.CFG_RA)="1" ?>
<Directory Id="RustAnalyzer" Name="." />
<?endif?>
<?if $(env.CFG_MIRI)="1" ?>
<Directory Id="Miri" Name="." />
<?endif?>
<Directory Id="Analysis" Name="." />
<Directory Id="Clippy" Name="." />
<?if $(env.CFG_CLIPPY)="1" ?>
<Directory Id="Clippy" Name="." />
<?endif?>
</Directory>
</Directory>

Expand Down Expand Up @@ -284,34 +292,42 @@
<ComponentRef Id="PathEnvPerMachine" />
<ComponentRef Id="PathEnvPerUser" />
</Feature>
<Feature Id="RustFmt"
Title="Formatter for rust"
Display="7"
Level="1"
AllowAdvertise="no">
<ComponentGroupRef Id="RustFmtGroup" />
</Feature>
<Feature Id="Clippy"
Title="Formatter and checker for rust"
Display="8"
Level="1"
AllowAdvertise="no">
<ComponentGroupRef Id="ClippyGroup" />
</Feature>
<Feature Id="Miri"
Title="Soundness checker for rust"
Display="9"
Level="1"
AllowAdvertise="no">
<ComponentGroupRef Id="MiriGroup" />
</Feature>
<Feature Id="RustAnalyzer"
Title="Analyzer for rust"
Display="10"
Level="1"
AllowAdvertise="no">
<ComponentGroupRef Id="RustAnalyzerGroup" />
</Feature>
<?if $(env.CFG_RUSTFMT)="1" ?>
<Feature Id="RustFmt"
Title="Formatter for rust"
Display="7"
Level="1"
AllowAdvertise="no">
<ComponentGroupRef Id="RustFmtGroup" />
</Feature>
<?endif?>
<?if $(env.CFG_CLIPPY)="1" ?>
<Feature Id="Clippy"
Title="Formatter and checker for rust"
Display="8"
Level="1"
AllowAdvertise="no">
<ComponentGroupRef Id="ClippyGroup" />
</Feature>
<?endif?>
<?if $(env.CFG_MIRI)="1" ?>
<Feature Id="Miri"
Title="Soundness checker for rust"
Display="9"
Level="1"
AllowAdvertise="no">
<ComponentGroupRef Id="MiriGroup" />
</Feature>
<?endif?>
<?if $(env.CFG_RA)="1" ?>
<Feature Id="RustAnalyzer"
Title="Analyzer for rust"
Display="10"
Level="1"
AllowAdvertise="no">
<ComponentGroupRef Id="RustAnalyzerGroup" />
</Feature>
<?endif?>
<Feature Id="Analysis"
Title="Analysis for rust"
Display="11"
Expand Down

0 comments on commit 49ca183

Please sign in to comment.