| Index: build/common.gypi | 
| diff --git a/build/common.gypi b/build/common.gypi | 
| index 4b008a4d8431024b0feee30ccb5b56af13ba192e..3700ada280d00a2e583e3a6f589ccda9a602d213 100644 | 
| --- a/build/common.gypi | 
| +++ b/build/common.gypi | 
| @@ -4111,8 +4111,12 @@ | 
| ['mips_arch_variant=="r6"', { | 
| 'conditions': [ | 
| ['clang==1', { | 
| -                        'cflags': [ '-target mipsel-linux-gnu', '-march=mips32r6', ], | 
| -                        'ldflags': [ '-target mipsel-linux-gnu', ], | 
| +                        'conditions': [ | 
| +                          ['OS=="android"', { | 
| +                            'cflags': [ '-target mipsel-linux-android', '-march=mipsel', '-mcpu=mips32r6', ], | 
| +                            'ldflags': [ '-target mipsel-linux-android', ], | 
| +                          }], | 
| +                        ], | 
| }, { # clang==0 | 
| 'cflags': ['-mips32r6', '-Wa,-mips32r6', ], | 
| }], | 
| @@ -4120,6 +4124,8 @@ | 
| 'ldflags': ['-mips32r6', '-Wl,-melf32ltsmip',], | 
| }], | 
| ], | 
| +                    'cflags': [ '-mfp64', '-mno-odd-spreg' ], | 
| +                    'ldflags': [ '-mfp64', '-mno-odd-spreg' ], | 
| }], | 
| ['mips_arch_variant=="r2"', { | 
| 'conditions': [ | 
| @@ -4211,14 +4217,48 @@ | 
| ['_toolset=="target"', { | 
| 'conditions': [ | 
| ['mips_arch_variant=="r6"', { | 
| -                    'cflags': ['-mips64r6', '-Wa,-mips64r6'], | 
| -                    'ldflags': ['-mips64r6'], | 
| +                    'conditions': [ | 
| +                      ['clang==1', { | 
| +                        'conditions': [ | 
| +                          ['OS=="android"', { | 
| +                            'cflags': [ '-target mips64el-linux-android', '-march=mips64el', '-mcpu=mips64r6', ], | 
| +                            'ldflags': [ '-target mips64el-linux-android', ], | 
| +                          }], | 
| +                        ], | 
| +                      }, { # clang==0 | 
| +                        'cflags': ['-mips64r6', '-Wa,-mips64r6'], | 
| +                        'ldflags': ['-mips64r6'], | 
| +                      }], | 
| +                    ], | 
| }], | 
| ['mips_arch_variant=="r2"', { | 
| 'cflags': ['-mips64r2', '-Wa,-mips64r2'], | 
| 'ldflags': ['-mips64r2'], | 
| }], | 
| +                  ['clang==1', { | 
| +                    'cflags!': [ | 
| +                      # Clang does not support the following options. | 
| +                      '-finline-limit=64', | 
| +                    ], | 
| +                    # TODO(gordanac) Enable integrated-as. | 
| +                    'cflags': [ '-fno-integrated-as' ], | 
| +                    'conditions': [ | 
| +                      ['OS=="android"', { | 
| +                        'cflags': [ | 
| +                          # Else /usr/bin/as gets picked up. | 
| +                          '-B<(android_toolchain)', | 
| +                        ], | 
| +                      }], | 
| +                    ], | 
| +                  }], | 
| +                  ['clang==1 and OS=="android"', { | 
| +                    'ldflags': [ | 
| +                      # Let clang find the ld in the NDK. | 
| +                      '--gcc-toolchain=<(android_toolchain)/..', | 
| +                    ], | 
| +                  }], | 
| ], | 
| + | 
| 'cflags_cc': [ | 
| '-Wno-uninitialized', | 
| ], | 
|  |