Build cleanups * Always use NEON if building for __aarch64__. NEON is required on arm64. * Apply Windows build options to librive_skia_renderer when the *target* is Windows (not the host). This fixes Windows building for Android. Diffs= 331ad0d55 Build cleanups
diff --git a/.rive_head b/.rive_head index ea4aba6..f7b09e1 100644 --- a/.rive_head +++ b/.rive_head
@@ -1 +1 @@ -2538229d6cc08105066da8d1cd306a2a57d35483 +331ad0d55068e5059f3e9c85af5382836e278e4e
diff --git a/include/rive/math/simd.hpp b/include/rive/math/simd.hpp index c50b473..2ee5a4e 100644 --- a/include/rive/math/simd.hpp +++ b/include/rive/math/simd.hpp
@@ -26,7 +26,7 @@ #include <immintrin.h> #endif -#ifdef __ARM_NEON__ +#if defined(__ARM_NEON__) || defined(__aarch64__) #include <arm_neon.h> #endif @@ -254,7 +254,6 @@ } #endif -#ifdef __ARM_NEON__ #ifdef __aarch64__ template <> RIVE_ALWAYS_INLINE gvec<float, 4> sqrt(gvec<float, 4> x) { @@ -274,7 +273,6 @@ return x; } #endif -#endif // This will only be present when building with Emscripten and "-msimd128". #if __has_builtin(__builtin_wasm_sqrt_f32x4) @@ -342,7 +340,7 @@ ////// Column-major (transposed) loads ////// -#ifdef __ARM_NEON__ +#if defined(__ARM_NEON__) || defined(__aarch64__) RIVE_ALWAYS_INLINE std::tuple<gvec<float, 4>, gvec<float, 4>, gvec<float, 4>, gvec<float, 4>> load4x4f(const float* matrix) {
diff --git a/skia/renderer/build/premake5.lua b/skia/renderer/build/premake5.lua index d91964f..709ea37 100644 --- a/skia/renderer/build/premake5.lua +++ b/skia/renderer/build/premake5.lua
@@ -26,21 +26,6 @@ '../../../include' } - if os.host() == 'macosx' then - links {'Cocoa.framework', 'rive', 'skia'} - elseif os.host() == 'windows' then - architecture 'x64' - links { - 'rive', - 'skia', - } - defines {'_USE_MATH_DEFINES'} - staticruntime 'on' -- Match Skia's /MT flag for link compatibility - runtime 'Release' -- Use /MT even in debug (/MTd is incompatible with Skia) - else - links {'rive', 'skia'} - end - libdirs {'../../../build/%{cfg.system}/bin/%{cfg.buildcfg}'} files { @@ -49,16 +34,26 @@ buildoptions {'-Wall', '-fno-exceptions', '-fno-rtti', '-Werror=format'} + filter "system:windows" + do + architecture 'x64' + defines {'_USE_MATH_DEFINES'} + staticruntime 'on' -- Match Skia's /MT flag for link compatibility + runtime 'Release' -- Use /MT even in debug (/MTd is incompatible with Skia) + end + filter {'system:macosx'} do includedirs {SKIA_DIR} libdirs {SKIA_DIR .. '/out/static'} + links {'Cocoa.framework', 'rive', 'skia'} end filter {'system:linux or windows'} do includedirs {SKIA_DIR} libdirs {SKIA_DIR .. '/out/static'} + links {'rive', 'skia'} end filter {'system:ios'}