From a455d3ee7d5ddefcdf008fa86ecc7c80aba758aa Mon Sep 17 00:00:00 2001 From: Rye Date: Mon, 3 Feb 2025 11:35:22 -0500 Subject: Introduce build system and preprocessor support for ARM64 --- indra/llcommon/llpreprocessor.h | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) (limited to 'indra/llcommon/llpreprocessor.h') diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h index b499a9ce10..d2a29d06b4 100644 --- a/indra/llcommon/llpreprocessor.h +++ b/indra/llcommon/llpreprocessor.h @@ -76,6 +76,23 @@ #endif #endif +// Set up CPU architecture defines +#if LL_MSVC && defined(_M_ARM64) +# define LL_ARM64 1 +#elif LL_GNUC && (defined(__arm64__) || defined(__aarch64__)) +# define LL_ARM64 1 +#elif LL_MSVC && _M_X64 +# define LL_X86_64 1 +# define LL_X86 1 +#elif LL_MSVC && _M_IX86 +# define LL_X86 1 +#elif LL_GNUC && ( defined(__amd64__) || defined(__x86_64__) ) +# define LL_X86_64 1 +# define LL_X86 1 +#elif LL_GNUC && ( defined(__i386__) ) +# define LL_X86 1 +#endif + // Deal with minor differences on Unixy OSes. #if LL_DARWIN || LL_LINUX // Different name, same functionality. @@ -118,11 +135,8 @@ #if LL_WINDOWS #define LL_DLLEXPORT __declspec(dllexport) #define LL_DLLIMPORT __declspec(dllimport) -#elif LL_LINUX -#define LL_DLLEXPORT __attribute__ ((visibility("default"))) -#define LL_DLLIMPORT #else -#define LL_DLLEXPORT +#define LL_DLLEXPORT __attribute__ ((visibility("default"))) #define LL_DLLIMPORT #endif // LL_WINDOWS @@ -187,4 +201,16 @@ #define LL_PRETTY_FUNCTION __PRETTY_FUNCTION__ #endif +#if LL_ARM64 +#define GLM_FORCE_NEON 1 +#else +#define GLM_FORCE_SSE2 1 +#endif + +#if LL_ARM64 +#define KDU_NEON_INTRINSICS 1 +#else +#define KDU_X86_INTRINSICS 1 +#endif + #endif // not LL_LINDEN_PREPROCESSOR_H -- cgit v1.2.3 From 2b44464a143c3b32ef4d3de4456b100e34ad79ef Mon Sep 17 00:00:00 2001 From: Rye Date: Thu, 28 Aug 2025 06:08:13 -0400 Subject: Fix up windows build error in GHA --- indra/llcommon/llpreprocessor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcommon/llpreprocessor.h') diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h index d2a29d06b4..b2a9734548 100644 --- a/indra/llcommon/llpreprocessor.h +++ b/indra/llcommon/llpreprocessor.h @@ -181,7 +181,7 @@ #define LL_TO_STRING_HELPER(x) #x #define LL_TO_STRING(x) LL_TO_STRING_HELPER(x) -#define LL_TO_WSTRING_HELPER(x) L#x +#define LL_TO_WSTRING_HELPER(x) L## #x #define LL_TO_WSTRING(x) LL_TO_WSTRING_HELPER(x) #define LL_FILE_LINENO_MSG(msg) __FILE__ "(" LL_TO_STRING(__LINE__) ") : " msg #define LL_GLUE_IMPL(x, y) x##y -- cgit v1.2.3