mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-19 10:05:05 -07:00
Undefine HAVE_{AMD64,AVX}_ASM with the Windows calling convention
Fixes #1371
This commit is contained in:
parent
2e662fb56f
commit
e9cc216804
10
build.zig
10
build.zig
@ -37,7 +37,6 @@ fn initLibConfig(b: *std.Build, target: std.Build.ResolvedTarget, lib: *Compile)
|
||||
lib.defineCMacro("HAVE_CATCHABLE_SEGV", "1");
|
||||
lib.defineCMacro("HAVE_CLOCK_GETTIME", "1");
|
||||
lib.defineCMacro("HAVE_GETPID", "1");
|
||||
lib.defineCMacro("HAVE_INLINE_ASM", "1");
|
||||
lib.defineCMacro("HAVE_MADVISE", "1");
|
||||
lib.defineCMacro("HAVE_MLOCK", "1");
|
||||
lib.defineCMacro("HAVE_MMAP", "1");
|
||||
@ -104,8 +103,13 @@ fn initLibConfig(b: *std.Build, target: std.Build.ResolvedTarget, lib: *Compile)
|
||||
|
||||
switch (target.result.cpu.arch) {
|
||||
.x86_64 => {
|
||||
lib.defineCMacro("HAVE_AMD64_ASM", "1");
|
||||
lib.defineCMacro("HAVE_AVX_ASM", "1");
|
||||
switch (target.result.os.tag) {
|
||||
.windows => {},
|
||||
else => {
|
||||
lib.defineCMacro("HAVE_AMD64_ASM", "1");
|
||||
lib.defineCMacro("HAVE_AVX_ASM", "1");
|
||||
},
|
||||
}
|
||||
lib.defineCMacro("HAVE_CPUID", "1");
|
||||
lib.defineCMacro("HAVE_MMINTRIN_H", "1");
|
||||
lib.defineCMacro("HAVE_EMMINTRIN_H", "1");
|
||||
|
Loading…
Reference in New Issue
Block a user