217 lines
6.5 KiB
Diff
217 lines
6.5 KiB
Diff
diff --git a/common.gypi b/common.gypi
|
|
index 23196aae..33ddc56f 100644
|
|
--- a/common.gypi
|
|
+++ b/common.gypi
|
|
@@ -153,7 +153,7 @@
|
|
'cflags': [ '-fPIC' ],
|
|
'ldflags': [ '-fPIC' ]
|
|
}],
|
|
- ['clang==1', {
|
|
+ ['OS == "msvc" and clang==1', {
|
|
'msbuild_toolset': 'ClangCL',
|
|
}],
|
|
],
|
|
@@ -244,7 +244,7 @@
|
|
'cflags': [ '-fPIC', '-I<(android_ndk_path)/sources/android/cpufeatures' ],
|
|
'ldflags': [ '-fPIC' ]
|
|
}],
|
|
- ['clang==1', {
|
|
+ ['OS == "msvc" and clang==1', {
|
|
'msbuild_toolset': 'ClangCL',
|
|
}],
|
|
],
|
|
@@ -483,6 +483,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/ncrypto/ncrypto.gyp b/deps/ncrypto/ncrypto.gyp
|
|
index 90ac158d..6c370d16 100644
|
|
--- a/deps/ncrypto/ncrypto.gyp
|
|
+++ b/deps/ncrypto/ncrypto.gyp
|
|
@@ -17,6 +17,11 @@
|
|
},
|
|
'sources': [ '<@(ncrypto_sources)' ],
|
|
'conditions': [
|
|
+ ['OS!="msvc"', {
|
|
+ 'cflags': [
|
|
+ '-Wno-deprecated-declarations',
|
|
+ ],
|
|
+ }],
|
|
['node_shared_openssl=="false"', {
|
|
'dependencies': [
|
|
'../openssl/openssl.gyp:openssl'
|
|
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/include/uv/win.h b/deps/uv/include/uv/win.h
|
|
index 12ac53b4..a8f4e697 100644
|
|
--- a/deps/uv/include/uv/win.h
|
|
+++ b/deps/uv/include/uv/win.h
|
|
@@ -287,7 +287,7 @@ typedef struct {
|
|
DWORD tls_index;
|
|
} uv_key_t;
|
|
|
|
-#define UV_ONCE_INIT { 0, NULL }
|
|
+#define UV_ONCE_INIT { 0, INIT_ONCE_STATIC_INIT }
|
|
|
|
typedef struct uv_once_s {
|
|
unsigned char unused;
|
|
diff --git a/deps/uv/src/win/util.c b/deps/uv/src/win/util.c
|
|
index e0dba1aa..98ea9d6d 100644
|
|
--- a/deps/uv/src/win/util.c
|
|
+++ b/deps/uv/src/win/util.c
|
|
@@ -509,7 +509,7 @@ unsigned int uv_available_parallelism(void) {
|
|
DWORD_PTR procmask;
|
|
DWORD_PTR sysmask;
|
|
int count;
|
|
- int i;
|
|
+ unsigned int i;
|
|
|
|
/* TODO(bnoordhuis) Use GetLogicalProcessorInformationEx() to support systems
|
|
* with > 64 CPUs? See https://github.com/libuv/libuv/pull/3458
|
|
diff --git a/deps/uv/uv.gyp b/deps/uv/uv.gyp
|
|
index fea86b4a..8608af01 100644
|
|
--- a/deps/uv/uv.gyp
|
|
+++ b/deps/uv/uv.gyp
|
|
@@ -194,6 +194,19 @@
|
|
},
|
|
'conditions': [
|
|
[ 'OS=="win"', {
|
|
+ 'conditions': [
|
|
+ ['OS!="msvc"', {
|
|
+ 'type': 'static_library',
|
|
+ 'conditions': [
|
|
+ ['clang==0', {
|
|
+ 'cflags': [
|
|
+ '-Wno-cast-function-type',
|
|
+ '-Wno-maybe-uninitialized',
|
|
+ ],
|
|
+ }],
|
|
+ ],
|
|
+ }],
|
|
+ ],
|
|
'defines': [
|
|
'_WIN32_WINNT=0x0602',
|
|
'_GNU_SOURCE',
|
|
diff --git a/node.gyp b/node.gyp
|
|
index 5b5b2b7c..14ed62d1 100644
|
|
--- a/node.gyp
|
|
+++ b/node.gyp
|
|
@@ -473,14 +473,14 @@
|
|
# 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',
|
|
+ '-Wno-undefined-inline',
|
|
'-Werror=extra-semi',
|
|
],
|
|
},
|
|
@@ -584,6 +584,9 @@
|
|
'WARNING_CFLAGS': [ '-Werror' ],
|
|
},
|
|
}],
|
|
+ [ 'OS=="win" and OS!="msvc"', {
|
|
+ 'sources': [ 'src/res/node.rc' ],
|
|
+ }],
|
|
[ 'node_intermediate_lib_type=="static_library" and '
|
|
'node_shared=="true" and OS in "aix os400"', {
|
|
# For AIX, shared lib is linked by static lib and .exp. In the
|
|
@@ -594,7 +597,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': {
|
|
@@ -628,7 +631,7 @@
|
|
'-Wl,--no-whole-archive',
|
|
],
|
|
}],
|
|
- [ 'OS=="win"', {
|
|
+ [ 'OS=="msvc"', {
|
|
'sources': [ 'src/res/node.rc' ],
|
|
}],
|
|
],
|
|
@@ -1462,7 +1465,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 9c989022..d20a6d38 100644
|
|
--- a/node.gypi
|
|
+++ b/node.gypi
|
|
@@ -27,7 +27,10 @@
|
|
|
|
'conditions': [
|
|
[ 'clang==1', {
|
|
- 'cflags': [ '-Werror=undefined-inline', '-Werror=extra-semi']
|
|
+ 'cflags': [ '-Wno-undefined-inline', '-Werror=extra-semi' ]
|
|
+ }],
|
|
+ [ 'clang==0', {
|
|
+ 'cflags_cc': [ '-Wno-template-id-cdtor' ]
|
|
}],
|
|
[ '"<(_type)"=="executable"', {
|
|
'msvs_settings': {
|