Skip to content

Commit d0ce5c7

Browse files
committed
Auto merge of #112049 - Kobzol:pgo-omit-benchmarks, r=<try>
[do not merge] CI experiments Various CI experiments for try/dist builds. r? `@ghost` try-job: i686-msvc-1 try-job: i686-msvc-2 try-job: dist-i686-msvc
2 parents 8c39296 + 52ea813 commit d0ce5c7

File tree

4 files changed

+10
-93
lines changed

4 files changed

+10
-93
lines changed

src/bootstrap/Cargo.toml

-5
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,6 @@ name = "rustdoc"
2828
path = "src/bin/rustdoc.rs"
2929
test = false
3030

31-
[[bin]]
32-
name = "sccache-plus-cl"
33-
path = "src/bin/sccache-plus-cl.rs"
34-
test = false
35-
3631
[dependencies]
3732
# Most of the time updating these dependencies requires modifications to the
3833
# bootstrap codebase(e.g., https://github.com/rust-lang/rust/issues/124565);

src/bootstrap/src/bin/sccache-plus-cl.rs

-38
This file was deleted.

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -2384,7 +2384,7 @@ impl Step for Bootstrap {
23842384
let tarball = Tarball::new(builder, "bootstrap", &target.triple);
23852385

23862386
let bootstrap_outdir = &builder.bootstrap_out;
2387-
for file in &["bootstrap", "rustc", "rustdoc", "sccache-plus-cl"] {
2387+
for file in &["bootstrap", "rustc", "rustdoc"] {
23882388
tarball.add_file(bootstrap_outdir.join(exe(file, target)), "bootstrap/bin", 0o755);
23892389
}
23902390

src/bootstrap/src/core/build_steps/llvm.rs

+9-49
Original file line numberDiff line numberDiff line change
@@ -735,57 +735,17 @@ fn configure_cmake(
735735
None => (builder.cc(target), builder.cxx(target).unwrap()),
736736
};
737737

738-
// Handle msvc + ninja + ccache specially (this is what the bots use)
739-
if target.is_msvc() && builder.ninja() && builder.config.ccache.is_some() {
740-
let mut wrap_cc = env::current_exe().expect("failed to get cwd");
741-
wrap_cc.set_file_name("sccache-plus-cl.exe");
742-
743-
cfg.define("CMAKE_C_COMPILER", sanitize_cc(&wrap_cc))
744-
.define("CMAKE_CXX_COMPILER", sanitize_cc(&wrap_cc));
745-
cfg.env("SCCACHE_PATH", builder.config.ccache.as_ref().unwrap())
746-
.env("SCCACHE_TARGET", target.triple)
747-
.env("SCCACHE_CC", &cc)
748-
.env("SCCACHE_CXX", &cxx);
749-
750-
// Building LLVM on MSVC can be a little ludicrous at times. We're so far
751-
// off the beaten path here that I'm not really sure this is even half
752-
// supported any more. Here we're trying to:
753-
//
754-
// * Build LLVM on MSVC
755-
// * Build LLVM with `clang-cl` instead of `cl.exe`
756-
// * Build a project with `sccache`
757-
// * Build for 32-bit as well
758-
// * Build with Ninja
759-
//
760-
// For `cl.exe` there are different binaries to compile 32/64 bit which
761-
// we use but for `clang-cl` there's only one which internally
762-
// multiplexes via flags. As a result it appears that CMake's detection
763-
// of a compiler's architecture and such on MSVC **doesn't** pass any
764-
// custom flags we pass in CMAKE_CXX_FLAGS below. This means that if we
765-
// use `clang-cl.exe` it's always diagnosed as a 64-bit compiler which
766-
// definitely causes problems since all the env vars are pointing to
767-
// 32-bit libraries.
768-
//
769-
// To hack around this... again... we pass an argument that's
770-
// unconditionally passed in the sccache shim. This'll get CMake to
771-
// correctly diagnose it's doing a 32-bit compilation and LLVM will
772-
// internally configure itself appropriately.
773-
if builder.config.llvm_clang_cl.is_some() && target.contains("i686") {
774-
cfg.env("SCCACHE_EXTRA_ARGS", "-m32");
775-
}
776-
} else {
777-
// If ccache is configured we inform the build a little differently how
778-
// to invoke ccache while also invoking our compilers.
779-
if use_compiler_launcher {
780-
if let Some(ref ccache) = builder.config.ccache {
781-
cfg.define("CMAKE_C_COMPILER_LAUNCHER", ccache)
782-
.define("CMAKE_CXX_COMPILER_LAUNCHER", ccache);
783-
}
738+
// If ccache is configured we inform the build a little differently how
739+
// to invoke ccache while also invoking our compilers.
740+
if use_compiler_launcher {
741+
if let Some(ref ccache) = builder.config.ccache {
742+
cfg.define("CMAKE_C_COMPILER_LAUNCHER", ccache)
743+
.define("CMAKE_CXX_COMPILER_LAUNCHER", ccache);
784744
}
785-
cfg.define("CMAKE_C_COMPILER", sanitize_cc(&cc))
786-
.define("CMAKE_CXX_COMPILER", sanitize_cc(&cxx))
787-
.define("CMAKE_ASM_COMPILER", sanitize_cc(&cc));
788745
}
746+
cfg.define("CMAKE_C_COMPILER", sanitize_cc(&cc))
747+
.define("CMAKE_CXX_COMPILER", sanitize_cc(&cxx))
748+
.define("CMAKE_ASM_COMPILER", sanitize_cc(&cc));
789749

790750
cfg.build_arg("-j").build_arg(builder.jobs().to_string());
791751
// FIXME(madsmtm): Allow `cmake-rs` to select flags by itself by passing

0 commit comments

Comments
 (0)