Skip to content
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## [Unreleased]

### Fixed
- **Emscripten builds.** Emscripten reports an x86 processor, so CMake added the AVX2 batch-transform source with `-mavx2 -mfma`, which wasm32 rejects. The x86 block is now skipped under Emscripten (the sources' x86 paths were already off there). Found building campello_renderer for WebGPU.

---

## [0.6.0] - 2026-08-19
Expand Down
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ target_include_directories(vector_math PUBLIC
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)

if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)|(x86_64)")
# Emscripten reports an x86 processor, but WebAssembly has no AVX2/FMA (and
# the sources' x86 paths are off there: common.hpp only defines
# __VECTOR_MATH_ARCH_X86_X64 for real x86 targets).
if (NOT EMSCRIPTEN AND CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)|(x86_64)")
# Runtime-dispatched AVX2 batch kernels. Compiled into their own TU so the
# rest of the library can stay at the baseline ISA while still using AVX2
# when the CPU supports it.
Expand Down
Loading