build: On Android, disable LTO for specific targets only when targeting GCC.
commite510374e7f8b5a9ee03c10d120f582b85f5b3cf8
authorpcc <pcc@chromium.org>
Wed, 26 Aug 2015 00:03:57 +0000 (25 17:03 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 26 Aug 2015 00:04:57 +0000 (26 00:04 +0000)
treec71e0804ce2d2a77766787cf2d730e33024e3eca
parentdee98ed1c1c86594e60ab41540bfda7c4e0ff5aa
build: On Android, disable LTO for specific targets only when targeting GCC.

The set of targets for which LTO is problematic will most likely differ
between GCC and LLVM. We also need different logic for LLVM (specifically,
LTO should not be disabled when building with cfi_vptr==1, as the -flto flag
must be passed together with -fsanitize=cfi*); this unbreaks the build for
those targets on Android when cfi_vptr==1.

Also add a drive-by TODO to use -lto_library flag on Mac.

BUG=469376
R=thakis@chromium.org, fdegans@chromium.org
TBR=jam@chromium.org

Review URL: https://codereview.chromium.org/1289623006

Cr-Commit-Position: refs/heads/master@{#345492}
13 files changed:
build/android/disable_gcc_lto.gypi [moved from build/android/disable_lto.gypi with 72% similarity]
build/android/increase_size_for_speed.gypi
build/common.gypi
chrome/chrome_browser.gypi
chrome/chrome_browser_ui.gypi
content/content.gyp
gpu/gpu.gyp
sandbox/linux/sandbox_linux.gypi
skia/skia.gyp
skia/skia_library_opts.gyp
third_party/libwebp/libwebp.gyp
third_party/opus/opus.gyp
third_party/sqlite/sqlite.gyp