Commit 97d1b87c authored by inglorion's avatar inglorion Committed by Commit Bot

Disable /guard:cf,nolongjmp in ThinLTO configurations where it breaks.

crbug.com/818086 shows that using control flow guard, ThinLTO, and
RTTI together results in broken binaries. This change disables CFG
when ThinLTO and RTTI are enabled to allow builds to succeed while a
fix for the problem is developed.

R=dpranke,thakis

Bug: 818086
Change-Id: Ia926350dc4193f3a1c87a45b36a8d5dc1dd97c08
Reviewed-on: https://chromium-review.googlesource.com/952666Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541646}
parent f27d6cae
...@@ -302,7 +302,13 @@ config("cfi_linker") { ...@@ -302,7 +302,13 @@ config("cfi_linker") {
# turned on either. # turned on either.
# CFG seems to lead to random corruption with incremental linking so turn off # CFG seems to lead to random corruption with incremental linking so turn off
# CFG in component builds. https://crbug.com/812421 # CFG in component builds. https://crbug.com/812421
if (!is_debug && !is_component_build) { # CFG, ThinLTO and RTTI don't currently work together, so turn off
# CFG for that combination. We detect RTTI by looking for
# use_cfi_diag || is_ubsan_vptr || is_ubsan_security, as per
# //build/config/compiler/BUILD.gn.
# TODO(inglorion): Re-enable once figured out, bug https://crbug.com/818086
if (!is_debug && !is_component_build &&
!(use_thin_lto && (use_cfi_diag || is_ubsan_vptr || is_ubsan_security))) {
# Turn on CFG in msvc linker, regardless of compiler used. Turn off CFG for # Turn on CFG in msvc linker, regardless of compiler used. Turn off CFG for
# longjmp (new in VS 2017) because it relies on compiler support which we do # longjmp (new in VS 2017) because it relies on compiler support which we do
# not have enabled. # not have enabled.
......
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