diff --git a/coreconf/config.gypi b/coreconf/config.gypi index da5a483050..0fd31ec678 100644 --- a/coreconf/config.gypi +++ b/coreconf/config.gypi @@ -218,7 +218,7 @@ '-Wl,--version-script,<(INTERMEDIATE_DIR)/out.>(mapfile)', ], }], - [ 'OS=="win"', { + [ 'cc_use_gnu_ld!=1 and OS=="win"', { # On Windows, .def files are used directly as sources. 'sources': [ '>(mapfile)', diff --git a/lib/freebl/freebl.gyp b/lib/freebl/freebl.gyp index e83d6ec837..f75474252b 100644 --- a/lib/freebl/freebl.gyp +++ b/lib/freebl/freebl.gyp @@ -174,6 +174,7 @@ 'VCCLCompilerTool': { #TODO: -Ox optimize flags 'PreprocessorDefinitions': [ + # Should be copied to mingw defines below 'MP_IS_LITTLE_ENDIAN', 'NSS_BEVAND_ARCFOUR', 'MPI_AMD64', @@ -185,6 +186,17 @@ }, }, }], + [ 'cc_use_gnu_ld==1 and OS=="win" and target_arch=="x64"', { + 'defines': [ + 'MP_IS_LITTLE_ENDIAN', + 'NSS_BEVAND_ARCFOUR', + 'MPI_AMD64', + 'MP_ASSEMBLY_MULTIPLY', + 'NSS_USE_COMBA', + 'USE_HW_AES', + 'INTEL_GCM', + ], + }], [ 'OS!="win"', { 'conditions': [ [ 'target_arch=="x64" or target_arch=="arm64" or target_arch=="aarch64"', { diff --git a/lib/freebl/freebl_base.gypi b/lib/freebl/freebl_base.gypi index bf7dd56ac0..027aa2702c 100644 --- a/lib/freebl/freebl_base.gypi +++ b/lib/freebl/freebl_base.gypi @@ -106,7 +106,7 @@ 'advapi32.lib', ], 'conditions': [ - [ 'target_arch=="x64"', { + [ 'cc_use_gnu_ld!=1 and target_arch=="x64"', { 'sources': [ 'arcfour-amd64-masm.asm', 'mpi/mpi_amd64.c', @@ -115,7 +115,8 @@ 'intel-aes-x64-masm.asm', 'intel-gcm-x64-masm.asm', ], - }, { + }], + [ 'cc_use_gnu_ld!=1 and target_arch!="x64"', { # not x64 'sources': [ 'mpi/mpi_x86_asm.c',