Skip to content

[win][arm64ec] Add testing for Arm64EC Windows #1512

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

Merged
merged 1 commit into from
Aug 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,15 @@ jobs:
os: windows-11-arm
rust: stable
target: aarch64-pc-windows-msvc
- build: cross-windows-arm64ec
os: windows-latest
rust: beta
target: arm64ec-pc-windows-msvc
no_run: --no-run
- build: windows-arm64ec
os: windows-11-arm
rust: beta
target: arm64ec-pc-windows-msvc
- build: cross-win64
os: windows-11-arm
rust: stable
Expand Down
12 changes: 12 additions & 0 deletions dev-tools/cc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,18 @@ fn main() {
.arg("/fsrc/NMakefile")
.env("OUT_DIR", &out)
.env("CC_FRONTEND", cc_frontend)
.env(
"EXTRA_CFLAGS",
if arch == "arm64ec" { "-arm64EC" } else { "" },
)
.env(
"EXTRA_LIBFLAGS",
if arch == "arm64ec" {
"-machine:arm64ec"
} else {
""
},
)
.status()
.unwrap();
assert!(status.success());
Expand Down
4 changes: 2 additions & 2 deletions dev-tools/cc-test/src/NMakefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
all: $(OUT_DIR)/msvc.lib $(OUT_DIR)/msvc.exe

!IF "$(CC_FRONTEND)" == "MSVC"
EXTRA_CFLAGS=-nologo
EXTRA_CFLAGS=$(EXTRA_CFLAGS) -nologo
CFLAG_OUTPUT=-Fo
!ELSE
CFLAG_OUTPUT=-o
!ENDIF

$(OUT_DIR)/msvc.lib: $(OUT_DIR)/msvc.o
lib -nologo -out:$(OUT_DIR)/msvc.lib $(OUT_DIR)/msvc.o
lib $(EXTRA_LIBFLAGS) -nologo -out:$(OUT_DIR)/msvc.lib $(OUT_DIR)/msvc.o

$(OUT_DIR)/msvc.o: src/msvc.c
$(CC) $(EXTRA_CFLAGS) -c $(CFLAG_OUTPUT)$@ src/msvc.c -MD
Expand Down
8 changes: 8 additions & 0 deletions dev-tools/cc-test/src/arm64ec.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
AREA |.text|, CODE, READONLY
GLOBAL |#asm|
ALIGN 4
|#asm| PROC
mov w0, #7
ret
ENDP
END
Loading