Files
MINGW-packages/mingw-w64-nodejs/0108-v8-buildflags-fixes.patch
2022-11-27 01:06:50 +05:30

123 lines
3.8 KiB
Diff

--- node-v18.12.1-orig/deps/v8/BUILD.gn 2022-11-19 01:19:36.472642700 +0800
+++ node-v18.12.1/deps/v8/BUILD.gn 2022-11-19 13:04:23.013462500 +0800
@@ -1186,14 +1186,14 @@
if (v8_current_cpu == "x86") {
defines += [ "V8_TARGET_ARCH_IA32" ]
- if (is_win) {
+ if (is_msvs) {
# Ensure no surprising artifacts from 80bit double math with x86.
cflags += [ "/arch:SSE2" ]
}
}
if (v8_current_cpu == "x64") {
defines += [ "V8_TARGET_ARCH_X64" ]
- if (is_win) {
+ if (is_msvs) {
# Increase the initial stack size. The default is 1MB, this is 2MB. This
# applies only to executables and shared libraries produced by V8 since
# ldflags are not pushed to dependants.
@@ -1253,7 +1253,7 @@
}
if (v8_no_inline) {
- if (is_win) {
+ if (is_msvs) {
cflags += [ "/Ob0" ]
} else {
cflags += [
@@ -1282,7 +1282,7 @@
}
}
- if (is_win) {
+ if (is_msvs) {
cflags += [
"/wd4245", # Conversion with signed/unsigned mismatch.
"/wd4267", # Conversion with possible loss of data.
@@ -1304,7 +1304,7 @@
]
}
- if (!is_clang && is_win) {
+ if (!is_clang && is_msvs) {
cflags += [
"/wd4506", # Benign "no definition for inline function"
@@ -1445,7 +1445,7 @@
]
}
- if (!is_clang && !is_win) {
+ if (!is_clang && !is_msvs) {
cflags += [
# Disable gcc warnings for optimizations based on the assumption that
# signed overflow does not occur. Generates false positives (see
@@ -5500,7 +5500,7 @@
"src/heap/base/worklist.cc",
]
- if (is_clang || !is_win) {
+ if (is_clang || !is_msvs) {
if (current_cpu == "x64") {
sources += [ "src/heap/base/asm/x64/push_registers_asm.cc" ]
} else if (current_cpu == "x86") {
@@ -5522,7 +5522,7 @@
} else if (current_cpu == "riscv64") {
sources += [ "src/heap/base/asm/riscv64/push_registers_asm.cc" ]
}
- } else if (is_win) {
+ } else if (is_msvs) {
if (current_cpu == "x64") {
sources += [ "src/heap/base/asm/x64/push_registers_masm.S" ]
} else if (current_cpu == "x86") {
--- node-v18.12.1-orig/tools/v8_gypfiles/toolchain.gypi 2022-11-05 00:13:15.000000000 +0800
+++ node-v18.12.1/tools/v8_gypfiles/toolchain.gypi 2022-11-25 17:46:58.403510900 +0800
@@ -952,6 +952,11 @@
'xcode_settings': {
'ARCHS': [ 'x86_64' ],
},
+ 'conditions': [
+ ['OS=="win" and OS!="winmsvs"', {
+ 'ldflags': [ '-Wl,--stack,2097152' ],
+ }],
+ ],
'msvs_settings': {
'VCLinkerTool': {
'StackReserveSize': '2097152',
@@ -973,6 +978,14 @@
},
}],
['OS=="win" and v8_target_arch=="ia32"', {
+ 'conditions': [
+ ['OS!="winmsvs"', {
+ 'cflags_cc': [ '-msse2' ],
+ 'defines': [
+ 'V8_SWISS_TABLE_HAVE_SSE2_HOST=1',
+ ],
+ }],
+ ],
'msvs_settings': {
'VCCLCompilerTool': {
# Ensure no surprising artifacts from 80bit double math with x86.
--- node-v18.12.1-orig/tools/v8_gypfiles/v8.gyp 2022-11-05 00:13:15.000000000 +0800
+++ node-v18.12.1/tools/v8_gypfiles/v8.gyp 2022-11-19 22:50:00.453731500 +0800
@@ -1604,7 +1600,7 @@
['enable_lto=="true"', {
'cflags_cc': [ '-fno-lto' ],
}],
- ['clang or OS!="win"', {
+ ['clang or OS!="winmsvs"', {
'conditions': [
['_toolset == "host" and host_arch == "x64" or _toolset == "target" and target_arch=="x64"', {
'sources': [
@@ -1658,7 +1654,7 @@
}],
]
}],
- ['OS=="win"', {
+ ['OS=="winmsvs"', {
'conditions': [
['_toolset == "host" and host_arch == "x64" or _toolset == "target" and target_arch=="x64"', {
'sources': [