Skip to content

Commit 78a64af

Browse files
Rollup 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 f1f9d43 + 2dbc976 commit 78a64af

File tree

3 files changed

+8
-13
lines changed

3 files changed

+8
-13
lines changed

compiler/rustc_codegen_cranelift/Readme.md

Lines changed: 1 addition & 1 deletion
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

Lines changed: 3 additions & 12 deletions
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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,7 @@ auto:
418418
--set rust.codegen-units=1
419419
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
420420
DIST_REQUIRE_ALL_TOOLS: 1
421+
CODEGEN_BACKENDS: llvm,cranelift
421422
<<: *job-windows-8c
422423

423424
- image: dist-i686-msvc
@@ -430,6 +431,7 @@ auto:
430431
--enable-profiler
431432
SCRIPT: python x.py dist bootstrap --include-default-paths
432433
DIST_REQUIRE_ALL_TOOLS: 1
434+
CODEGEN_BACKENDS: llvm,cranelift
433435
<<: *job-windows-8c
434436

435437
- image: dist-aarch64-msvc
@@ -454,6 +456,7 @@ auto:
454456
NO_DOWNLOAD_CI_LLVM: 1
455457
SCRIPT: python x.py dist bootstrap --include-default-paths
456458
DIST_REQUIRE_ALL_TOOLS: 1
459+
CODEGEN_BACKENDS: llvm,cranelift
457460
<<: *job-windows-8c
458461

459462
- image: dist-x86_64-mingw
@@ -466,6 +469,7 @@ auto:
466469
# incompatible with LLVM downloads today).
467470
NO_DOWNLOAD_CI_LLVM: 1
468471
DIST_REQUIRE_ALL_TOOLS: 1
472+
CODEGEN_BACKENDS: llvm,cranelift
469473
<<: *job-windows-8c
470474

471475
- image: dist-x86_64-msvc-alt

0 commit comments

Comments
 (0)