android: disable ThinLTO for official builds

This is a workaround for an apparently broken compiler roll, which is
blocking Clank canary releases. It should be reverted before we branch
for 77.

Bug: 973431
Binary-Size: ThinLTO saves us binary size. This is a workaround.
Change-Id: Id08e12acbc4a64a83d476139713d2da3fece3a62
Commit-Queue: George Burgess <>
Reviewed-by: Nico Weber <>
Reviewed-by: Dirk Pranke <>
Cr-Original-Commit-Position: refs/heads/master@{#669438}
Cr-Mirrored-Commit: 4f7e1019a72eac00eb343baa4b0c5887c546ec23
diff --git a/compiler/compiler.gni b/compiler/compiler.gni
index c351d6b..eb5f728 100644
--- a/compiler/compiler.gni
+++ b/compiler/compiler.gni
@@ -57,7 +57,9 @@
   # Enables support for ThinLTO, which links 3x-10x faster than full LTO. See
   # also
-  use_thin_lto = is_cfi || (is_android && is_official_build)
+  # TODO( reenable this for x86 Android when clang gets fixed
+  use_thin_lto =
+      is_cfi || (is_android && is_official_build && current_cpu != "x86")
   # Tell VS to create a PDB that references information in .obj files rather
   # than copying it all. This should improve linker performance. mspdbcmf.exe