tools: disable LTO for "v8_cppgc_shared" target#38346
Closed
jesec wants to merge 1 commit intonodejs:masterfrom
jesec:master
Closed
tools: disable LTO for "v8_cppgc_shared" target#38346jesec wants to merge 1 commit intonodejs:masterfrom jesec:master
jesec wants to merge 1 commit intonodejs:masterfrom
jesec:master
Conversation
"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>
richardlau
approved these changes
Apr 22, 2021
Member
richardlau
left a comment
There was a problem hiding this comment.
LGTM, although the conditional is probably redundant.
| ], | ||
| 'conditions': [ | ||
| ['enable_lto=="true"', { | ||
| 'cflags_cc': [ '-fno-lto' ], |
Member
There was a problem hiding this comment.
This could be set regardless of the enable_lto setting?
Member
Author
There was a problem hiding this comment.
Technically, yes, at least for GCC. But I am not sure about MSVC or Clang. Since enable_lto implies some other conditions, I think it is better to have this conditional.
joyeecheung
reviewed
Apr 22, 2021
joyeecheung
approved these changes
Apr 22, 2021
Trott
approved these changes
Apr 27, 2021
Collaborator
Collaborator
Collaborator
gengjiawen
approved these changes
Apr 29, 2021
Member
|
Landed in 6ca785b |
gengjiawen
pushed a commit
that referenced
this pull request
Apr 29, 2021
"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: #38346 Refs: #35957 Refs: #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>
targos
pushed a commit
that referenced
this pull request
Apr 29, 2021
"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: #38346 Refs: #35957 Refs: #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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
"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