Skip to content

Test merged Windows ARM64X DLLs on ARM runners - #210

Merged
danoli3 merged 6 commits into
masterfrom
ci/windows-arm64x
Oct 28, 2026
Merged

danoli3 merged 6 commits into
masterfrom
ci/windows-arm64x

Conversation

@danoli3

@danoli3 danoli3 commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Add an experimental action that builds FreeImage as ARM64 and ARM64EC, then relinks the actual native and compatible objects/libraries into one ARM64X DLL using Microsoft's /LINKREPROFULLPATHRSP + /MACHINE:ARM64X approach. The production build and ABI defaults are unchanged.

Debug and Release jobs retain the two ordinary DLLs as controls and upload the merged DLL, three dynamically loading consumers, PE/export reports and SHA-256 checksums. Native windows-11-arm jobs then verify:

  • ARM64 and ARM64EC consumers can use their matching ordinary DLLs.
  • The opposite unmerged DLL is rejected as incompatible.
  • ARM64, ARM64EC and emulated x64 consumers all load the same merged DLL.
  • PNG, TIFF, WebP, JP2, JXR and JPEG encode/decode successfully through memory and callback I/O; input APIs produce identical pixels and lossless encoders retain source pixels.

The build includes the default bundled codecs, OpenEXR, LibRaw and JXR. Optional HEIF/JPEG XL bundles are outside this initial experiment. Runtime execution on Windows ARM is required, rather than treating successful x64-hosted cross-compilation as proof.

Local checks: workflow YAML and whitespace validation pass; the native response parser handles object/library/DEF paths containing spaces and ignores output/default-library flags; the standalone x64 probe compiles and links with MinGW without importing FreeImage. Actual ARM64X linking/loading is validated by the new action.

Build reference: https://learn.microsoft.com/en-us/windows/arm/arm64x-build

@danoli3
danoli3 marked this pull request as ready for review October 27, 2026 11:32
Both Release and Debug fail the hybrid identity check without saying
what dumpbin printed, and the artifact upload was skipped, so the saved
headers were lost. Print each DLL's machine line, include it in the
exception, and upload the artifacts even when the build step fails.
The last run showed the plain ARM64EC DLL and the merged DLL both print
"8664 machine (x64) (ARM64X)": dumpbin tags any image with CHPE metadata,
so its header line cannot tell them apart. Neither DLL has a dynamic
value relocation table, although the merged one carries the native code
(33.9 MB vs 18.7 MB EC + 21.8 MB ARM64). So the native objects were
linked, but not as an ARM64X image.

- check-arm64x.py reads the load config's dynamic value relocations and
  counts ARM64X fixups, including the one that rewrites the header's
  Machine field. The hybrid stage now fails on that instead of on the
  dumpbin text.
- A control job runs the checker on windows-11-arm against
  kernel32.dll, which Windows on ARM ships as ARM64X, so a parser bug
  cannot pass or fail the merge check unnoticed.
- The hybrid stage prints the generated project's <TargetMachine> and
  machine options and relinks at normal MSBuild verbosity, printing the
  /MACHINE switches the linker actually received. That shows whether
  -A ARM64EC's TargetMachine overrides /MACHINE:ARM64X.
- dumpbin /loadconfig output and the hybrid link log are saved with the
  artifacts.
@danoli3
danoli3 merged commit ee7b3ca into master Oct 28, 2026
78 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant