Skip to content

turn creating 8dot3 names off for windows for speed #133033

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
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.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

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