Skip to content

Commit 3d9d39f

Browse files
committed
Auto merge of rust-lang#128939 - bjorn3:windows_cg_clif_component, r=albertlarsan68
Distribute rustc_codegen_cranelift for Windows With support for raw-dylib recently added to cg_clif, and inline assembly support working on Windows for quite a while now, all blockers for distributing cg_clif on Windows that I mentioned in rust-lang#81746 (comment) are fixed now.
2 parents 38e3a57 + 2dbc976 commit 3d9d39f

File tree

3 files changed

+8
-13
lines changed

3 files changed

+8
-13
lines changed

compiler/rustc_codegen_cranelift/Readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ For more docs on how to build and test see [build_system/usage.txt](build_system
7070
|AIX|[^xcoff]|N/A|N/A|[^xcoff]|
7171
|Other unixes|||||
7272
|macOS|||N/A|N/A|
73-
|Windows|[^no-rustup]||N/A|N/A|
73+
|Windows|||N/A|N/A|
7474

7575
✅: Fully supported and tested
7676
❓: Maybe supported, not tested

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

+3-12
Original file line numberDiff line numberDiff line change
@@ -1348,18 +1348,9 @@ impl Step for CodegenBackend {
13481348
return None;
13491349
}
13501350

1351-
if self.backend == "cranelift" {
1352-
if !target_supports_cranelift_backend(self.compiler.host) {
1353-
builder.info("target not supported by rustc_codegen_cranelift. skipping");
1354-
return None;
1355-
}
1356-
1357-
if self.compiler.host.is_windows() {
1358-
builder.info(
1359-
"dist currently disabled for windows by rustc_codegen_cranelift. skipping",
1360-
);
1361-
return None;
1362-
}
1351+
if self.backend == "cranelift" && !target_supports_cranelift_backend(self.compiler.host) {
1352+
builder.info("target not supported by rustc_codegen_cranelift. skipping");
1353+
return None;
13631354
}
13641355

13651356
let compiler = self.compiler;

src/ci/github-actions/jobs.yml

+4
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,7 @@ auto:
430430
--set rust.codegen-units=1
431431
SCRIPT: python x.py build --set rust.debug=true opt-dist && PGO_HOST=x86_64-pc-windows-msvc ./build/x86_64-pc-windows-msvc/stage0-tools-bin/opt-dist windows-ci -- python x.py dist bootstrap --include-default-paths
432432
DIST_REQUIRE_ALL_TOOLS: 1
433+
CODEGEN_BACKENDS: llvm,cranelift
433434
<<: *job-windows-8c
434435

435436
- image: dist-i686-msvc
@@ -442,6 +443,7 @@ auto:
442443
--enable-profiler
443444
SCRIPT: python x.py dist bootstrap --include-default-paths
444445
DIST_REQUIRE_ALL_TOOLS: 1
446+
CODEGEN_BACKENDS: llvm,cranelift
445447
<<: *job-windows-8c
446448

447449
- image: dist-aarch64-msvc
@@ -466,6 +468,7 @@ auto:
466468
NO_DOWNLOAD_CI_LLVM: 1
467469
SCRIPT: python x.py dist bootstrap --include-default-paths
468470
DIST_REQUIRE_ALL_TOOLS: 1
471+
CODEGEN_BACKENDS: llvm,cranelift
469472
<<: *job-windows-8c
470473

471474
- image: dist-x86_64-mingw
@@ -478,6 +481,7 @@ auto:
478481
# incompatible with LLVM downloads today).
479482
NO_DOWNLOAD_CI_LLVM: 1
480483
DIST_REQUIRE_ALL_TOOLS: 1
484+
CODEGEN_BACKENDS: llvm,cranelift
481485
<<: *job-windows-8c
482486

483487
- image: dist-x86_64-msvc-alt

0 commit comments

Comments
 (0)