Skip to content

Embree does not build for win-arm64 (upstream toolchain gaps) #3

Description

@jcant0n

win-arm64 was dropped from .github/workflows/embree-cmake.yml and from the supported
platform list. Two different walls, both upstream, on Embree v4.4.1:

MSVC toolset. common/sys/intrinsics.h gates its ARM path on __ARM_NEON and
__aarch64__, which are GCC/Clang predefines. MSVC defines neither on ARM64 (it defines
_M_ARM64), so the #else branch runs and pulls in immintrin.h, which errors with
"This header is specific to X86, X64, ARM64, and ARM64EC targets". Note this happens at
compile time: CMake configures perfectly and reports Building for AArch64, so a check on
the configure output is not enough to catch it.

clang-cl toolset (-T ClangCL, clang 19.1.5 ships on the windows-11-arm runner).
Clears the above, then fails with
clang-cl : error : unsupported option '-msse2' for target 'arm64-pc-windows-msvc' on
common/sys, common/math, common/simd and common/tasking — Embree's own CMake handing
x86 flags to an ARM target.

common/cmake/clang.cmake has an ARM branch that omits -msse2, so the flags are coming from
the non-ARM path; working out exactly why, and fixing it, means patching Embree's build system
and carrying that patch here.

Worth weighing before picking this up again: Embree is a ray tracing kernel, and a build forced
through a configuration upstream does not test fails by returning wrong intersections, not by
crashing. Any win-arm64 binary produced this way needs validating against results from a
supported platform before it ships.

Reproduce with gh workflow run embree-cmake.yml -f only-rid=win-arm64 after re-adding the
matrix entry.

Runs: 31488732222 (MSVC), 31493683821 (clang-cl).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions