Skip to content

Testing Embree4 + WinArm#84

Open
jdumas wants to merge 59 commits intomainfrom
jdumas/embree4
Open

Testing Embree4 + WinArm#84
jdumas wants to merge 59 commits intomainfrom
jdumas/embree4

Conversation

@jdumas
Copy link
Copy Markdown
Contributor

@jdumas jdumas commented Feb 20, 2026

No description provided.

@jdumas jdumas changed the title Testing upstream Embree4 + WinArm Testing Embree4 + WinArm Apr 4, 2026
jdumas and others added 19 commits May 4, 2026 08:10
- Add embree-winarm.patch: guards _tzcnt_u64, _lzcnt_u64, _pext_u32/_pdep_u32
  with !defined(_M_ARM64) (MSVC ARM64 macro, missing alongside __aarch64__)
- simde.cmake: disable SIMDE native NEON on MSVC ARM64 to avoid __m128/__m128i
  being the same underlying __n128 type, which breaks WindingNumber overloads

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…e ARM64 fix

Strawberry patch.exe is strict about hunk line counts and running offsets,
causing hunk 3 to search at the wrong line. Use file(READ)+string(REGEX
REPLACE)+file(WRITE) instead to apply _M_ARM64 guards in intrinsics.h.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ARM64 Python on GitHub Actions hostedtoolcache lacks development files
(headers + import lib). CMake falls back to x64 Python's Development.Module,
but MSVC in ARM64 mode cannot link against the x64 python313.lib, producing
hundreds of unresolved __imp_Py* linker errors.

Fix: split the Windows configure step to pass -DLAGRANGE_MODULE_PYTHON=OFF
for windows-11-arm, and update CMakeLists.txt to honor an explicit
-DLAGRANGE_MODULE_PYTHON=OFF even when LAGRANGE_ALL=ON.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The module-inclusion loop unconditionally honored LAGRANGE_ALL, so passing
-DLAGRANGE_MODULE_PYTHON=OFF together with -DLAGRANGE_ALL=ON still pulled
modules/python into the build. Capture the cache state before option()
materializes the default value, then skip modules the user explicitly
disabled even when LAGRANGE_ALL is set.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Instead of disabling Python, install the ARM64 Python with its full
development files by passing architecture: arm64 to setup-python.
Without this, setup-python only installs the ARM64 interpreter (no
python313.lib or headers), causing CMake FindPython to fall back to
the x64 Python for Development.Module -- which the ARM64 MSVC
toolchain cannot link against.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The windows-11-arm hostedtoolcache Python only ships the interpreter;
it lacks python3XX.lib and headers needed for extension module linking.

After MSVC dev-cmd setup, synthesize the ARM64 import library from the
ARM64 python3XX.dll using lib.exe /DEF /MACHINE:ARM64, and copy the
architecture-neutral headers from the x64 Python install if absent.
Then pass -DPython_EXECUTABLE and -DPython_FIND_REGISTRY=NEVER to CMake
so FindPython uses the now-complete ARM64 Python rather than falling
back to the x64 install (which the ARM64 MSVC toolchain cannot link).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The windows-11-arm hostedtoolcache Python ships only the interpreter
binary — no include/ headers and no libs/python3XX.lib — so CMake's
FindPython falls back to x64 Python for Development.Module, which the
ARM64 MSVC toolchain cannot link against.

Use astral-sh/setup-uv + uv python install to pull a
python-build-standalone distribution instead. These distributions
include full dev files. uv intentionally defaults to x64-emulated
Python on Windows ARM64 runners (uv PR #13724), so we pin the
cpython-3.13-windows-aarch64 specifier to get the native build.

Pass -DPython_EXECUTABLE and -DPython_FIND_REGISTRY=NEVER to CMake so
FindPython uses the uv-managed ARM64 Python and does not fall back to
the registry-registered x64 Python.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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