Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJesse Chan <jc@linux.com>2021-04-22 14:41:09 +0300
committerMichaƫl Zasso <targos@protonmail.com>2021-04-29 14:45:44 +0300
commitbec959ef8b97b5a589775e554964cb14548c9895 (patch)
treee422501f0f46125e9bf81e8935e91bacc8536903 /tools
parent3cbfde1f253fd21ea011c718f21dd40292621c99 (diff)
tools: disable LTO for "v8_cppgc_shared" target
"PushAllRegistersAndIterateStack" is implemented in assembly and called from "stack.cc" via 'extern "C"'. [1] However, LTO does not work well with symbol usage from assembly. [2] This change workarounds the issue by disabling LTO for the target. With GCC 10 and "./configure --enable-lto", compilation succeeds after this change. [1] v8/v8@c10863153 [2] https://gcc.gnu.org/wiki/LinkTimeOptimizationFAQ#Symbol_usage_from_assembly_language Refs: #35957 Refs: #38335 Signed-off-by: Jesse Chan <jc@linux.com> PR-URL: https://github.com/nodejs/node/pull/38346 Refs: https://github.com/nodejs/node/issues/35957 Refs: https://github.com/nodejs/node/issues/38335 Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/v8_gypfiles/v8.gyp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp
index ccb5984f47d..377e12d1fdc 100644
--- a/tools/v8_gypfiles/v8.gyp
+++ b/tools/v8_gypfiles/v8.gyp
@@ -1378,6 +1378,9 @@
'<(V8_ROOT)/src/heap/base/worklist.h',
],
'conditions': [
+ ['enable_lto=="true"', {
+ 'cflags_cc': [ '-fno-lto' ],
+ }],
['clang or OS!="win"', {
'conditions': [
['_toolset == "host" and host_arch == "x64" or _toolset == "target" and target_arch=="x64"', {