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}