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

Unified Diff: build/config/compiler/BUILD.gn

Issue 843563002: Add compiler and linker flags for MIPS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check is_android_webview_build Created 5 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/compiler/BUILD.gn
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index dcd5d6596d619d40e2389f20f7fee94cdd351694..9dc31c4d7f3ad2fb2568692f0e081817e3ca4264 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -271,6 +271,32 @@ 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.
wtc 2015/01/07 21:40:00 I copied this comment from the cpu_arch == "arm" c
+ if (!is_android_webview_build) {
+ # TODO(wtc): check mips_arch_variant (possible values are "r1", "r2",
Ben Chan 2015/01/07 21:48:40 should it be done in the same CL?
wtc 2015/01/07 23:00:22 Done.
+ # "r6") and use -mips32, -mips32r2 or -mips32r6 in cflags accordingly.
+ cflags += [
+ "-mips32",
+ "-Wa,-mips32",
+ ]
+ }
+ ldflags += [ "-Wl,--no-keep-memory" ]
+ cflags_cc += [ "-Wno-uninitialized" ]
Ben Chan 2015/01/07 21:48:40 are these ldflags and cflags_cc really needed?
wtc 2015/01/07 23:00:22 I ported the GYP code faithfully without thinking.
+ } 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) {
+ # TODO(wtc): check mips_arch_variant (possible values are "r2", "r6")
+ # and use -mips32r2 or -mips32r6 in cflags and ldflags accordingly.
+ cflags += [
+ "-mips64r2",
+ "-Wa,-mips64r2",
+ ]
+ ldflags += [ "-mips64r2" ]
+ }
+ cflags_cc += [ "-Wno-uninitialized" ]
}
defines += [ "_FILE_OFFSET_BITS=64" ]
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698