diff options
author | Konstantin Demin <rockdrilla@gmail.com> | 2023-04-06 03:24:58 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-06 00:24:58 +0000 |
commit | c3cd75d10ba116dff3dd839cbc5a034cf39a0095 (patch) | |
tree | 640b9eb6436ab5c2bda0de522124220954e78b6b /tools | |
parent | 5c86f223aec046d6dd37b5ff22907e30be7315ee (diff) | |
download | node-new-c3cd75d10ba116dff3dd839cbc5a034cf39a0095.tar.gz |
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>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/icu/icu-generic.gyp | 24 | ||||
-rw-r--r-- | tools/v8_gypfiles/d8.gyp | 4 | ||||
-rw-r--r-- | tools/v8_gypfiles/v8.gyp | 24 |
3 files changed, 52 insertions, 0 deletions
diff --git a/tools/icu/icu-generic.gyp b/tools/icu/icu-generic.gyp index db45e6fbdf..2655b9e694 100644 --- a/tools/icu/icu-generic.gyp +++ b/tools/icu/icu-generic.gyp @@ -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' ], + }], + ], }, ], } diff --git a/tools/v8_gypfiles/d8.gyp b/tools/v8_gypfiles/d8.gyp index 656e5dffd3..ba79ebcba7 100644 --- a/tools/v8_gypfiles/d8.gyp +++ b/tools/v8_gypfiles/d8.gyp @@ -69,6 +69,10 @@ '<(icu_gyp_path):icudata', ], }], + # Avoid excessive LTO + ['enable_lto=="true"', { + 'ldflags': [ '-fno-lto' ], + }], ], }, ], diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp index e6651b89fb..4ed217616f 100644 --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp @@ -1511,6 +1511,10 @@ ['want_separate_host_toolset', { 'toolsets': ['host'], }], + # Avoid excessive LTO + ['enable_lto=="true"', { + 'ldflags': [ '-fno-lto' ], + }], ], 'defines!': [ 'BUILDING_V8_SHARED=1', @@ -1556,6 +1560,10 @@ '<(_msvs_precompiled_source)', ], }], + # Avoid excessive LTO + ['enable_lto=="true"', { + 'ldflags': [ '-fno-lto' ], + }], ], }, # mksnapshot { @@ -1569,6 +1577,10 @@ ['want_separate_host_toolset', { 'toolsets': ['host'], }], + # Avoid excessive LTO + ['enable_lto=="true"', { + 'ldflags': [ '-fno-lto' ], + }], ], 'defines!': [ '_HAS_EXCEPTIONS=0', @@ -1603,6 +1615,10 @@ ['want_separate_host_toolset', { 'toolsets': ['host'], }], + # Avoid excessive LTO + ['enable_lto=="true"', { + 'ldflags': [ '-fno-lto' ], + }], ], 'dependencies': [ 'torque_base', @@ -1635,6 +1651,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", @@ -1651,6 +1671,10 @@ }, { 'dependencies': ['gen-regexp-special-case#target'], }], + # Avoid excessive LTO + ['enable_lto=="true"', { + 'ldflags': [ '-fno-lto' ], + }], ], 'actions': [ { |