-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node 15 build fails with LTO enabled #35957
Comments
Which Linux distribution and which kernel are you using? Which C/C++ toolchain (compiler, linker, etc.) are you using? |
Linux 4.19.88 |
cc @nodejs/build-files |
Same thing here when Linux 3.10.0 (CentOS 7.8.2003 x86_64) 14.15.1 compiles fine with |
Same thing here with latest --- Environment --- |
"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 <[email protected]> PR-URL: #38346 Refs: #35957 Refs: #38335 Reviewed-By: Khaidi Chu <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Jiawen Geng <[email protected]>
landed in master. |
"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 <[email protected]> PR-URL: #38346 Refs: #35957 Refs: #38335 Reviewed-By: Khaidi Chu <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Jiawen Geng <[email protected]>
Thanks! Build was successful in master branch with |
Node 15.0.1 build fails when LTO is enabled with the following message:
The build with same configuration used to be successful for Node 14.x and previous versions.
It seems related to the v8 version upgrade from 8.4 to 8.6. It may be the
PushAllRegistersAndIterateStack
assembly gets inlined multiple times, which leads to duplicated symbols in the LTO compilation unit.What steps will reproduce the bug?
The text was updated successfully, but these errors were encountered: