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

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

Issue 1475943003: gn: add support for clang for MIPS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « build/config/android/BUILD.gn ('k') | build/config/nacl/config.gni » ('j') | 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 bd1067f8fc37e5fb42b2ef8abd05e2f624bd66b1..6923a32f1dd4c5f8e7a02b236df2251ebcd57615 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -425,29 +425,93 @@ config("compiler_cpu_abi") {
}
} else if (current_cpu == "mipsel") {
if (mips_arch_variant == "r6") {
- cflags += [
- "-mips32r6",
- "-Wa,-mips32r6",
- ]
- if (is_android) {
+ if (is_clang) {
+ cflags += [
+ "-target",
+ "mipsel-linux-gnu",
+ "-march=mips32r6",
+ ]
ldflags += [
+ "-target",
+ "mipsel-linux-gnu",
+ ]
+ } else {
+ cflags += [
"-mips32r6",
- "-Wl,-melf32ltsmip",
+ "-Wa,-mips32r6",
]
+ if (is_android) {
+ ldflags += [
+ "-mips32r6",
+ "-Wl,-melf32ltsmip",
+ ]
+ }
}
} else if (mips_arch_variant == "r2") {
- cflags += [
- "-mips32r2",
- "-Wa,-mips32r2",
- ]
- if (mips_float_abi == "hard" && mips_fpu_mode != "") {
- cflags += [ "-m$mips_fpu_mode" ]
+ if (is_clang) {
+ if (is_android) {
+ cflags += [
+ "-target",
+ "mipsel-linux-android",
+ "-march=mipsel",
+ "-mcpu=mips32r2",
+ ]
+ ldflags += [
+ "-target",
+ "mipsel-linux-android",
+ ]
+ } else {
+ cflags += [
+ "-target",
+ "mipsel-linux-gnu",
+ "-march=mipsel",
+ "-mcpu=mips32r2",
+ ]
+ ldflags += [
+ "-target",
+ "mipsel-linux-gnu",
+ ]
+ }
+ } else {
+ cflags += [
+ "-mips32r2",
+ "-Wa,-mips32r2",
+ ]
+ if (mips_float_abi == "hard" && mips_fpu_mode != "") {
+ cflags += [ "-m$mips_fpu_mode" ]
+ }
}
} else if (mips_arch_variant == "r1") {
- cflags += [
- "-mips32",
- "-Wa,-mips32",
- ]
+ if (is_clang) {
+ if (is_android) {
+ cflags += [
+ "-target",
+ "mipsel-linux-android",
+ "-march=mipsel",
+ "-mcpu=mips32",
+ ]
+ ldflags += [
+ "-target",
+ "mipsel-linux-android",
+ ]
+ } else {
+ cflags += [
+ "-target",
+ "mipsel-linux-gnu",
+ "-march=mipsel",
+ "-mcpu=mips32",
+ ]
+ ldflags += [
+ "-target",
+ "mipsel-linux-gnu",
+ ]
+ }
+ } else {
+ cflags += [
+ "-mips32",
+ "-Wa,-mips32",
+ ]
+ }
}
if (mips_dsp_rev == 1) {
« no previous file with comments | « build/config/android/BUILD.gn ('k') | build/config/nacl/config.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698