Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1892)

Unified Diff: build/common.gypi

Issue 2030003002: MIPS64: Add clang compile flags for MIPS64r6 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/config/android/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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',
],
« no previous file with comments | « no previous file | build/config/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698