Commit dbefc8ee authored by ofrobots's avatar ofrobots Committed by Commit bot

Use -fno-delete-null-pointer-checks with gcc builds

R=bmeurer@chromium.org, jochen@chromium.org, machenbach@chromium.org
BUG=v8:3782

Review-Url: https://codereview.chromium.org/2310513002
Cr-Commit-Position: refs/heads/master@{#39286}
parent c9096461
...@@ -322,6 +322,13 @@ config("toolchain") { ...@@ -322,6 +322,13 @@ config("toolchain") {
if (is_android && v8_android_log_stdout) { if (is_android && v8_android_log_stdout) {
defines += [ "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): Support v8_enable_prof on Windows.
# TODO(jochen): Add support for compiling with simulators. # TODO(jochen): Add support for compiling with simulators.
......
...@@ -1098,6 +1098,13 @@ ...@@ -1098,6 +1098,13 @@
}], }],
], # conditions ], # conditions
}], }],
# 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
['OS!="win" and clang==0', {
'cflags': [ '-fno-delete-null-pointer-checks' ]
}],
['OS=="solaris"', { ['OS=="solaris"', {
'defines': [ '__C99FEATURES__=1' ], # isinf() etc. 'defines': [ '__C99FEATURES__=1' ], # isinf() etc.
}], }],
......
Markdown is supported
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