Commit 6ca785b9 authored by Jesse Chan's avatar Jesse Chan Committed by gengjiawen
Browse files

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: default avatarJesse 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: default avatarKhaidi Chu <i@2333.moe>
Reviewed-By: default avatarRichard Lau <rlau@redhat.com>
Reviewed-By: default avatarJoyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: default avatarRich Trott <rtrott@gmail.com>
Reviewed-By: default avatarJiawen Geng <technicalcute@gmail.com>
parent 32ade699
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment