From eed8c558fc626b68a1a01ffcb64b7139b7fab033 Mon Sep 17 00:00:00 2001 From: Brian White Date: Sat, 9 Jul 2022 18:28:18 -0400 Subject: [PATCH] windows issue wip --- deps/base64/base64.gyp | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/deps/base64/base64.gyp b/deps/base64/base64.gyp index 0e3cf034c28620..be68561708fef0 100644 --- a/deps/base64/base64.gyp +++ b/deps/base64/base64.gyp @@ -10,7 +10,9 @@ 'include_dirs': [ 'base64/include', 'base64/lib' ], 'direct_dependent_settings': { 'include_dirs': [ 'base64/include' ], + 'defines': [ 'BASE64_STATIC_DEFINE' ], }, + 'defines': [ 'BASE64_STATIC_DEFINE' ], 'sources': [ 'base64/include/libbase64.h', 'base64/lib/arch/generic/codec.c', @@ -69,7 +71,7 @@ 'type': 'static_library', 'include_dirs': [ 'base64/include', 'base64/lib' ], 'sources': [ 'base64/lib/arch/ssse3/codec.c' ], - 'defines': [ 'HAVE_SSSE3=1' ], + 'defines': [ 'BASE64_STATIC_DEFINE', 'HAVE_SSSE3=1' ], 'conditions': [ [ 'OS!="win"', { 'cflags': [ '-mssse3' ], @@ -85,7 +87,7 @@ 'type': 'static_library', 'include_dirs': [ 'base64/include', 'base64/lib' ], 'sources': [ 'base64/lib/arch/sse41/codec.c' ], - 'defines': [ 'HAVE_SSE41=1' ], + 'defines': [ 'BASE64_STATIC_DEFINE', 'HAVE_SSE41=1' ], 'conditions': [ [ 'OS!="win"', { 'cflags': [ '-msse4.1' ], @@ -101,7 +103,7 @@ 'type': 'static_library', 'include_dirs': [ 'base64/include', 'base64/lib' ], 'sources': [ 'base64/lib/arch/sse42/codec.c' ], - 'defines': [ 'HAVE_SSE42=1' ], + 'defines': [ 'BASE64_STATIC_DEFINE', 'HAVE_SSE42=1' ], 'conditions': [ [ 'OS!="win"', { 'cflags': [ '-msse4.2' ], @@ -117,13 +119,21 @@ 'type': 'static_library', 'include_dirs': [ 'base64/include', 'base64/lib' ], 'sources': [ 'base64/lib/arch/avx/codec.c' ], - 'defines': [ 'HAVE_AVX=1' ], + 'defines': [ 'BASE64_STATIC_DEFINE', 'HAVE_AVX=1' ], 'conditions': [ [ 'OS!="win"', { 'cflags': [ '-mavx' ], 'xcode_settings': { 'OTHER_CFLAGS': [ '-mavx' ] }, + }, { + 'msvs_settings': { + 'VCCLCompilerTool': { + 'AdditionalOptions': [ + '/arch:AVX' + ], + }, + }, }], ], }, @@ -133,13 +143,21 @@ 'type': 'static_library', 'include_dirs': [ 'base64/include', 'base64/lib' ], 'sources': [ 'base64/lib/arch/avx2/codec.c' ], - 'defines': [ 'HAVE_AVX2=1' ], + 'defines': [ 'BASE64_STATIC_DEFINE', 'HAVE_AVX2=1' ], 'conditions': [ [ 'OS!="win"', { 'cflags': [ '-mavx2' ], 'xcode_settings': { 'OTHER_CFLAGS': [ '-mavx2' ] }, + }, { + 'msvs_settings': { + 'VCCLCompilerTool': { + 'AdditionalOptions': [ + '/arch:AVX2' + ], + }, + }, }], ], }, @@ -149,7 +167,7 @@ 'type': 'static_library', 'include_dirs': [ 'base64/include', 'base64/lib' ], 'sources': [ 'base64/lib/arch/neon32/codec.c' ], - 'defines': [ 'HAVE_NEON32=1' ], + 'defines': [ 'BASE64_STATIC_DEFINE', 'HAVE_NEON32=1' ], 'conditions': [ [ 'OS!="win"', { 'cflags': [ '-mfpu=neon' ], @@ -165,7 +183,7 @@ 'type': 'static_library', 'include_dirs': [ 'base64/include', 'base64/lib' ], 'sources': [ 'base64/lib/arch/neon64/codec.c' ], - 'defines': [ 'HAVE_NEON64=1' ], + 'defines': [ 'BASE64_STATIC_DEFINE', 'HAVE_NEON64=1' ], # NEON is required in arm64, so no -mfpu flag is needed }