diff --git a/common.gypi b/common.gypi index fc45ca43..5b1ac89e 100644 --- a/common.gypi +++ b/common.gypi @@ -482,6 +482,9 @@ 'NOMINMAX', ], }], + ['OS == "win" and OS != "msvc"', { + 'ldflags': [ '-pthread' ], + }], [ 'OS in "linux freebsd openbsd solaris aix os400"', { 'cflags': [ '-pthread' ], 'ldflags': [ '-pthread' ], diff --git a/deps/llhttp/llhttp.gyp b/deps/llhttp/llhttp.gyp index c7b8800a..b6703471 100644 --- a/deps/llhttp/llhttp.gyp +++ b/deps/llhttp/llhttp.gyp @@ -10,6 +10,11 @@ { 'target_name': 'llhttp', 'type': 'static_library', + 'conditions': [ + [ 'target_arch!="arm64"', { + 'cflags_c': [ '-mssse3' ], + }], + ], 'include_dirs': [ '.', 'include' ], 'direct_dependent_settings': { 'include_dirs': [ 'include' ], diff --git a/deps/ngtcp2/ngtcp2.gyp b/deps/ngtcp2/ngtcp2.gyp index 0f2929b7..07dca184 100644 --- a/deps/ngtcp2/ngtcp2.gyp +++ b/deps/ngtcp2/ngtcp2.gyp @@ -109,6 +109,7 @@ 'defines': ['HAVE_UNISTD_H'] }], ['OS=="win"', { + 'cflags_c': [ '-mssse3' ], 'defines': [ 'WIN32', '_WINDOWS', diff --git a/deps/simdutf/simdutf.gyp b/deps/simdutf/simdutf.gyp index ca8cd2fa..3a51b363 100644 --- a/deps/simdutf/simdutf.gyp +++ b/deps/simdutf/simdutf.gyp @@ -16,6 +16,11 @@ 'sources': [ '<@(simdutf_sources)', ], + 'conditions': [ + ['clang==0 and OS!="msvc"', { + 'cflags_cc': [ '-Wno-template-id-cdtor' ], + }] + ], }, ] } diff --git a/deps/uv/uv.gyp b/deps/uv/uv.gyp index 6c86c3fa..4e439dbb 100644 --- a/deps/uv/uv.gyp +++ b/deps/uv/uv.gyp @@ -193,6 +193,17 @@ }, 'conditions': [ [ 'OS=="win"', { + 'conditions': [ + ['OS!="msvc"', { + 'type': 'static_library', + }], + ['OS!="msvc" and clang==0', { + 'cflags_c': [ + '-Wno-cast-function-type', + '-Wno-maybe-uninitialized' + ], + }], + ], 'defines': [ '_WIN32_WINNT=0x0602', '_GNU_SOURCE', diff --git a/node.gyp b/node.gyp index 2a8e6a66..e1b9445a 100644 --- a/node.gyp +++ b/node.gyp @@ -465,14 +465,13 @@ # Putting these explicitly here so not to depend on `common.gypi`. # `common.gypi` need to be more general because it is used to build userland native addons. # Refs: https://github.com/nodejs/node-gyp/issues/1118 - 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ], + 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', '-Wno-unused-variable', '-Wno-deprecated-declarations', ], 'xcode_settings': { 'WARNING_CFLAGS': [ '-Wall', '-Wendif-labels', '-W', '-Wno-unused-parameter', - '-Werror=undefined-inline', '-Werror=extra-semi', ], }, @@ -502,6 +501,11 @@ }], ], }], + ['OS!="msvc" and clang==0', { + 'cflags_cc': [ + '-Wno-template-id-cdtor' + ] + }], ['OS in "aix os400"', { 'ldflags': [ '-Wl,-bnoerrmsg', @@ -550,6 +554,11 @@ 'sources': [ 'src/node_main.cc' ], + 'conditions': [ + ['OS!="msvc"', { + 'sources': [ 'src/res/node.rc' ] + }] + ], 'dependencies': [ 'deps/histogram/histogram.gyp:histogram', @@ -592,7 +601,7 @@ }, { 'dependencies': [ '<(node_lib_target_name)' ], 'conditions': [ - ['OS=="win" and node_shared=="true"', { + ['OS=="msvc" and node_shared=="true"', { 'dependencies': ['generate_node_def'], 'msvs_settings': { 'VCLinkerTool': { @@ -626,7 +635,7 @@ '-Wl,--no-whole-archive', ], }], - [ 'OS=="win"', { + [ 'OS=="msvc"', { 'sources': [ 'src/res/node.rc' ], }], ], @@ -1442,7 +1451,7 @@ }, ] }], # end aix section - ['OS=="win" and node_shared=="true"', { + ['OS=="msvc" and node_shared=="true"', { 'targets': [ { 'target_name': 'gen_node_def', diff --git a/node.gypi b/node.gypi index ccce1243..af049539 100644 --- a/node.gypi +++ b/node.gypi @@ -27,7 +27,10 @@ 'conditions': [ [ 'clang==1', { - 'cflags': [ '-Werror=undefined-inline', '-Werror=extra-semi'] + 'cflags': [ '-Werror=extra-semi' ] + }], + [ 'clang==0', { + 'cflags_cc': [ '-Wno-template-id-cdtor' ] }], [ '"<(_type)"=="executable"', { 'msvs_settings': { @@ -66,7 +69,7 @@ '_UNICODE=1', ], 'conditions': [ - ['clang==0', { + ['OS=="msvc" and clang==0', { 'msvs_precompiled_header': 'tools/msvs/pch/node_pch.h', 'msvs_precompiled_source': 'tools/msvs/pch/node_pch.cc', 'sources': [