build, deps, tools: avoid excessive LTO

Don't link intermediate executables with LTO in order to speed up
overall build time.

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/47313
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
This commit is contained in:
Konstantin Demin authored and Moshe Atlow committed 2023-07-07 00:06:02 +03:00
1 parent 7f2bccc5d6
commit db910dd6b2
6 files changed
+80

No files matched your search

+4
View File
@@ -21,5 +21,9 @@
],
},
}],
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
}
+4
View File
@@ -79,6 +79,10 @@
}, {
'includes': ['./openssl-cl_asm.gypi'],
}],
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
]
}, {
# openssl-fipsmodule target
+20
View File
@@ -1202,6 +1202,10 @@
[ 'OS!="linux" or ossfuzz!="true"', {
'type': 'none',
}],
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
}, # fuzz_env
{
@@ -1304,6 +1308,10 @@
'Ws2_32.lib',
],
}],
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
}, # cctest
@@ -1360,6 +1368,10 @@
'Ws2_32.lib',
],
}],
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
}, # embedtest
@@ -1378,6 +1390,10 @@
'test/overlapped-checker/main_unix.c'
],
}],
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
]
}, # overlapped-checker
{
@@ -1434,6 +1450,10 @@
'Ws2_32.lib',
],
}],
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
}, # node_mksnapshot
], # end targets
+24
View File
@@ -428,6 +428,12 @@
'<@(icu_src_derb)',
'no-op.cc',
],
'conditions': [
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
},
# This tool is used to rebuild res_index.res manifests
{
@@ -439,6 +445,12 @@
'iculslocs.cc',
'no-op.cc',
],
'conditions': [
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
},
# This tool is used to package, unpackage, repackage .dat files
# and convert endianesses
@@ -451,6 +463,12 @@
'<@(icu_src_icupkg)',
'no-op.cc',
],
'conditions': [
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
},
# this is used to convert .dat directly into .obj
{
@@ -462,6 +480,12 @@
'<@(icu_src_genccode)',
'no-op.cc',
],
'conditions': [
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
},
],
}
+4
View File
@@ -69,6 +69,10 @@
'<(icu_gyp_path):icudata',
],
}],
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
},
],
+24
View File
@@ -1401,6 +1401,10 @@
['want_separate_host_toolset', {
'toolsets': ['host'],
}],
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
'defines!': [
'BUILDING_V8_SHARED=1',
@@ -1445,6 +1449,10 @@
'<(_msvs_precompiled_source)',
],
}],
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
}, # mksnapshot
{
@@ -1458,6 +1466,10 @@
['want_separate_host_toolset', {
'toolsets': ['host'],
}],
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
'defines!': [
'_HAS_EXCEPTIONS=0',
@@ -1492,6 +1504,10 @@
['want_separate_host_toolset', {
'toolsets': ['host'],
}],
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
'dependencies': [
'torque_base',
@@ -1524,6 +1540,10 @@
['want_separate_host_toolset', {
'toolsets': ['host'],
}],
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
'sources': [
"<(V8_ROOT)/src/regexp/gen-regexp-special-case.cc",
@@ -1540,6 +1560,10 @@
}, {
'dependencies': ['gen-regexp-special-case#target'],
}],
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
'actions': [
{