Index: build/config/compiler/BUILD.gn |
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn |
index dcd5d6596d619d40e2389f20f7fee94cdd351694..b5c6fe3e57ffb27bb7e1d72711e744dbf20cfc5c 100644 |
--- a/build/config/compiler/BUILD.gn |
+++ b/build/config/compiler/BUILD.gn |
@@ -6,6 +6,9 @@ import("//build/config/android/config.gni") |
if (cpu_arch == "arm") { |
import("//build/config/arm.gni") |
} |
+if (cpu_arch == "mipsel" || cpu_arch == "mips64el") { |
+ import("//build/config/mips.gni") |
wtc
2015/01/07 23:56:35
I decided to add build/config/mips.gni and declare
|
+} |
if (is_posix) { |
import("//build/config/gcc/gcc_version.gni") |
} |
@@ -271,6 +274,51 @@ config("compiler") { |
] |
} |
} |
+ } else if (cpu_arch == "mipsel") { |
+ # Don't set the compiler flags for the WebView build. These will come |
+ # from the Android build system. |
+ if (!is_android_webview_build) { |
+ if (mips_arch_variant == "r6") { |
+ cflags += [ |
+ "-mips32r6", |
+ "-Wa,-mips32r6", |
+ ] |
+ if (is_android) { |
+ ldflags += [ |
+ "-mips32r6", |
+ "-Wl,-melf32ltsmip", |
+ ] |
+ } |
+ } else if (mips_arch_variant == "r2") { |
+ cflags += [ |
+ "-mips32r2", |
+ "-Wa,-mips32r2", |
+ ] |
+ } else if (mips_arch_variant == "r1") { |
+ cflags += [ |
+ "-mips32", |
+ "-Wa,-mips32", |
+ ] |
+ } |
+ } |
+ } else if (cpu_arch == "mips64el") { |
+ # Don't set the compiler flags for the WebView build. These will come |
+ # from the Android build system. |
+ if (!is_android_webview_build) { |
+ if (mips_arch_variant == "r6") { |
+ cflags += [ |
+ "-mips64r6", |
+ "-Wa,-mips64r6", |
+ ] |
+ ldflags += [ "-mips64r6" ] |
+ } else if (mips_arch_variant == "r2") { |
+ cflags += [ |
+ "-mips64r2", |
+ "-Wa,-mips64r2", |
+ ] |
+ ldflags += [ "-mips64r2" ] |
+ } |
+ } |
} |
defines += [ "_FILE_OFFSET_BITS=64" ] |