patches: bump to 14.17.5 (#210)
This commit is contained in:
parent
23232aad15
commit
a479e40365
@ -1,118 +1,3 @@
|
||||
--- node/common.gypi
|
||||
+++ node/common.gypi
|
||||
@@ -164,17 +164,28 @@
|
||||
'v8_enable_handle_zapping': 0,
|
||||
'pgo_generate': ' -fprofile-generate ',
|
||||
'pgo_use': ' -fprofile-use -fprofile-correction ',
|
||||
- 'lto': ' -flto=4 -fuse-linker-plugin -ffat-lto-objects ',
|
||||
'conditions': [
|
||||
['node_shared != "true"', {
|
||||
'MSVC_runtimeType': 0 # MultiThreaded (/MT)
|
||||
}, {
|
||||
'MSVC_runtimeType': 2 # MultiThreadedDLL (/MD)
|
||||
}],
|
||||
+ ['llvm_version=="0.0"', {
|
||||
+ 'lto': ' -flto=4 -ffat-lto-objects ', # GCC
|
||||
+ }, {
|
||||
+ 'lto': ' -flto ', # Clang
|
||||
+ }],
|
||||
],
|
||||
},
|
||||
'cflags': [ '-O3' ],
|
||||
'conditions': [
|
||||
+ ['enable_lto=="true"', {
|
||||
+ 'cflags': ['<(lto)'],
|
||||
+ 'ldflags': ['<(lto)'],
|
||||
+ 'xcode_settings': {
|
||||
+ 'LLVM_LTO': 'YES',
|
||||
+ },
|
||||
+ }],
|
||||
['OS=="linux"', {
|
||||
'conditions': [
|
||||
['node_section_ordering_info!=""', {
|
||||
@@ -206,10 +217,6 @@
|
||||
'cflags': ['<(pgo_use)'],
|
||||
'ldflags': ['<(pgo_use)'],
|
||||
},],
|
||||
- ['enable_lto=="true"', {
|
||||
- 'cflags': ['<(lto)'],
|
||||
- 'ldflags': ['<(lto)'],
|
||||
- },],
|
||||
],
|
||||
},],
|
||||
['OS == "android"', {
|
||||
--- node/configure.py
|
||||
+++ node/configure.py
|
||||
@@ -165,7 +165,7 @@ parser.add_option("--enable-lto",
|
||||
action="store_true",
|
||||
dest="enable_lto",
|
||||
help="Enable compiling with lto of a binary. This feature is only available "
|
||||
- "on linux with gcc and g++ 5.4.1 or newer.")
|
||||
+ "with gcc 5.4.1+ or clang 3.9.1+.")
|
||||
|
||||
parser.add_option("--link-module",
|
||||
action="append",
|
||||
@@ -866,6 +866,7 @@ def get_gas_version(cc):
|
||||
# quite prepared to go that far yet.
|
||||
def check_compiler(o):
|
||||
if sys.platform == 'win32':
|
||||
+ o['variables']['llvm_version'] = '0.0'
|
||||
if not options.openssl_no_asm and options.dest_cpu in ('x86', 'x64'):
|
||||
nasm_version = get_nasm_version('nasm')
|
||||
o['variables']['nasm_version'] = nasm_version
|
||||
@@ -1045,12 +1046,19 @@ def configure_mips(o, target_arch):
|
||||
host_byteorder = 'little' if target_arch in ('mipsel', 'mips64el') else 'big'
|
||||
o['variables']['v8_host_byteorder'] = host_byteorder
|
||||
|
||||
+def clang_version_ge(version_checked):
|
||||
+ for compiler in [(CC, 'c'), (CXX, 'c++')]:
|
||||
+ ok, is_clang, clang_version, gcc_version = \
|
||||
+ try_check_compiler(compiler[0], compiler[1])
|
||||
+ if is_clang and clang_version >= version_checked:
|
||||
+ return True
|
||||
+ return False
|
||||
|
||||
def gcc_version_ge(version_checked):
|
||||
for compiler in [(CC, 'c'), (CXX, 'c++')]:
|
||||
- ok, is_clang, clang_version, compiler_version = \
|
||||
+ ok, is_clang, clang_version, gcc_version = \
|
||||
try_check_compiler(compiler[0], compiler[1])
|
||||
- if is_clang or compiler_version < version_checked:
|
||||
+ if is_clang or gcc_version < version_checked:
|
||||
return False
|
||||
return True
|
||||
|
||||
@@ -1131,18 +1139,19 @@ def configure_node(o):
|
||||
o['variables']['enable_pgo_generate'] = b(options.enable_pgo_generate)
|
||||
o['variables']['enable_pgo_use'] = b(options.enable_pgo_use)
|
||||
|
||||
- if flavor != 'linux' and (options.enable_lto):
|
||||
+ if flavor == 'win' and (options.enable_lto):
|
||||
raise Exception(
|
||||
- 'The lto option is supported only on linux.')
|
||||
-
|
||||
- if flavor == 'linux':
|
||||
- if options.enable_lto:
|
||||
- version_checked = (5, 4, 1)
|
||||
- if not gcc_version_ge(version_checked):
|
||||
- version_checked_str = ".".join(map(str, version_checked))
|
||||
- raise Exception(
|
||||
- 'The option --enable-lto is supported for gcc and gxx %s'
|
||||
- ' or newer only.' % (version_checked_str))
|
||||
+ 'Use Link Time Code Generation instead.')
|
||||
+
|
||||
+ if options.enable_lto:
|
||||
+ gcc_version_checked = (5, 4, 1)
|
||||
+ clang_version_checked = (3, 9, 1)
|
||||
+ if not gcc_version_ge(gcc_version_checked) and not clang_version_ge(clang_version_checked):
|
||||
+ gcc_version_checked_str = ".".join(map(str, gcc_version_checked))
|
||||
+ clang_version_checked_str = ".".join(map(str, clang_version_checked))
|
||||
+ raise Exception(
|
||||
+ 'The option --enable-lto is supported for gcc %s+'
|
||||
+ 'or clang %s+ only.' % (gcc_version_checked_str, clang_version_checked_str))
|
||||
|
||||
o['variables']['enable_lto'] = b(options.enable_lto)
|
||||
|
||||
--- node/deps/v8/include/v8.h
|
||||
+++ node/deps/v8/include/v8.h
|
||||
@@ -9633,6 +9633,10 @@ class V8_EXPORT V8 {
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"v16.4.1": ["node.v16.4.1.cpp.patch"],
|
||||
"v14.17.2": ["node.v14.17.2.cpp.patch"],
|
||||
"v14.17.5": ["node.v14.17.5.cpp.patch"],
|
||||
"v12.22.2": ["node.v12.22.2.cpp.patch"],
|
||||
"v10.24.1": ["node.v10.24.1.cpp.patch"],
|
||||
"v8.17.0": ["node.v8.17.0.cpp.patch"]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user