llvm-18: fix windows build error because of include

This commit is contained in:
Laytan Laats
2024-04-23 00:44:37 +02:00
parent f9a7d2bf04
commit a3821615dc
+9 -5
View File
@@ -1,5 +1,3 @@
#include <llvm/Config/llvm-config.h>
#if defined(GB_SYSTEM_FREEBSD) || defined(GB_SYSTEM_OPENBSD)
#include <sys/types.h>
#include <sys/sysctl.h>
@@ -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 <llvm/Config/llvm-config.h>
#if LLVM_VERSION_MAJOR >= 18
#define AMD64_MAX_ALIGNMENT (16)
#else
#define AMD64_MAX_ALIGNMENT (8)
#endif
#endif
gb_global TargetMetrics target_windows_i386 = {