From a08d94a0e47d3378171fb92134fd3118b57f2f06 Mon Sep 17 00:00:00 2001 From: David Millington Date: Sun, 30 Nov 2025 19:07:37 +0200 Subject: [PATCH] LLVM optimised math: Ensure build ifdefs exactly match Elements and EBuild --- Source/Math.PurePascal.pas | 2 +- Source/Math.pas | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Math.PurePascal.pas b/Source/Math.PurePascal.pas index cdd2ab4..37a4181 100644 --- a/Source/Math.PurePascal.pas +++ b/Source/Math.PurePascal.pas @@ -5,7 +5,7 @@ // (WebAssembly, Android, mobile Darwin platforms, unsupported architectures) // Check same conditions as Math.pas - must be kept in sync! -{$IF ((WINDOWS AND (i386 OR x86_64 OR ARM64)) OR ((DARWIN AND NOT (IOS OR TVOS OR WATCHOS OR VISIONOS)) AND (i386 OR x86_64 OR ARM64)) OR ((LINUX AND NOT ANDROID) AND (i386 OR x86_64 OR ARM64)))} +{$IF (WINDOWS AND (i386 OR x86_64 OR ARM64)) OR (DARWIN AND NOT (IOS OR TVOS OR WATCHOS OR VISIONOS))} {$DEFINE USE_LLVM_MATH_VECTORLIB} {$ENDIF} diff --git a/Source/Math.pas b/Source/Math.pas index ed699ef..8329f04 100644 --- a/Source/Math.pas +++ b/Source/Math.pas @@ -8,9 +8,9 @@ interface // Two implementations available: // 1. Math.LLVMVectorLib.pas - SLEEF-based (ENABLED for supported platforms) // 2. Math.PurePascal.pas - Pure Pascal fallback -// Supported: Windows (), macOS (ARM), Linux (non-Android) on i386, x86_64, ARM64 +// Supported: Windows (i386, x86_64, ARM64), macOS (x86_64, ARM64) // You MUST keep this up to date with Elements' IslandOutput.pas, ShouldUseVectorMathLib() -{$IF ((WINDOWS AND (i386 OR x86_64 OR ARM64)) OR ((DARWIN AND NOT (IOS OR TVOS OR WATCHOS OR VISIONOS)) AND (i386 OR x86_64 OR ARM64)) OR ((LINUX AND NOT ANDROID) AND (i386 OR x86_64 OR ARM64)))} +{$IF (WINDOWS AND (i386 OR x86_64 OR ARM64)) OR (DARWIN AND NOT (IOS OR TVOS OR WATCHOS OR VISIONOS))} {$DEFINE USE_LLVM_MATH_VECTORLIB} // Uses SLEEF library with LLVM vectorization {$ENDIF}