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
This commit is contained in:
csmartdalton
2023-01-26 17:42:52 +00:00
parent afce35e127
commit 0998d90d88
3 changed files with 13 additions and 20 deletions

View File

@@ -1 +1 @@
2538229d6cc08105066da8d1cd306a2a57d35483
331ad0d55068e5059f3e9c85af5382836e278e4e

View File

@@ -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 @@ template <> RIVE_ALWAYS_INLINE gvec<float, 2> sqrt(gvec<float, 2> x)
}
#endif
#ifdef __ARM_NEON__
#ifdef __aarch64__
template <> RIVE_ALWAYS_INLINE gvec<float, 4> sqrt(gvec<float, 4> x)
{
@@ -274,7 +273,6 @@ template <> RIVE_ALWAYS_INLINE gvec<float, 2> sqrt(gvec<float, 2> x)
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 @@ template <typename T, int N> RIVE_ALWAYS_INLINE void store(void* dst, gvec<T, N>
////// 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)
{

View File

@@ -26,21 +26,6 @@ do
'../../../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 @@ do
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'}