Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Unified Diff: BUILD.gn

Issue 2310513002: Use -fno-delete-null-pointer-checks with gcc builds (Closed)
Patch Set: address nits and add GN config as well Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gypfiles/toolchain.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: BUILD.gn
diff --git a/BUILD.gn b/BUILD.gn
index 4e2c2b9aacb7fb93d69c0ff84cce099e0e81a49a..a84b29d0d72e0bdaafd9d5b25e384d5b0690574a 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -322,6 +322,13 @@ config("toolchain") {
if (is_android && v8_android_log_stdout) {
defines += [ "V8_ANDROID_LOG_STDOUT" ]
}
+ if (!is_win && !is_clang) {
+ # GCC 6+ can optimize away pointer comparisons to null. This is
+ # problematic as V8 encodes Values through tagged pointers and comparisons
+ # with 0 are actually necessary in many cases. As a temporary Workaround
+ # we disable this optimization. See: https://crbug.com/v8/3782
+ cflags += [ "-fno-delete-null-pointer-checks" ]
+ }
# TODO(jochen): Support v8_enable_prof on Windows.
# TODO(jochen): Add support for compiling with simulators.
« no previous file with comments | « no previous file | gypfiles/toolchain.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698