diff --git a/src/build_settings.cpp b/src/build_settings.cpp index a2534b01f..b9682adc8 100644 --- a/src/build_settings.cpp +++ b/src/build_settings.cpp @@ -1,5 +1,3 @@ -#include - #if defined(GB_SYSTEM_FREEBSD) || defined(GB_SYSTEM_OPENBSD) #include #include @@ -925,10 +923,16 @@ gb_internal isize MAX_ERROR_COLLECTOR_COUNT(void) { } // NOTE: AMD64 targets had their alignment on 128 bit ints bumped from 8 to 16 (undocumented of course). -#if LLVM_VERSION_MAJOR >= 18 - #define AMD64_MAX_ALIGNMENT (16) +#if defined(GB_SYSTEM_WINDOWS) + #define AMD64_MAX_ALIGNMENT (8) // TODO: up to 16 when Windows is updated to LLVM 18. #else - #define AMD64_MAX_ALIGNMENT (8) + #include + + #if LLVM_VERSION_MAJOR >= 18 + #define AMD64_MAX_ALIGNMENT (16) + #else + #define AMD64_MAX_ALIGNMENT (8) + #endif #endif gb_global TargetMetrics target_windows_i386 = {