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

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

Issue 2875553003: Add support for building v8 on mips and mips64 using GN. (Closed)
Patch Set: added cflags and removed nacl mips definition Created 3 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 | « build/config/BUILDCONFIG.gn ('k') | build/config/mips.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 f129035e796bb80e037ce33e88c7ace0495fe2cc..792b47c2a8750e44470a4eff5eed88c2257401e9 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -13,7 +13,8 @@ import("//build_overrides/build.gni")
if (current_cpu == "arm" || current_cpu == "arm64") {
import("//build/config/arm.gni")
}
-if (current_cpu == "mipsel" || current_cpu == "mips64el") {
+if (current_cpu == "mipsel" || current_cpu == "mips64el" ||
+ current_cpu == "mips" || current_cpu == "mips64") {
import("//build/config/mips.gni")
}
if (is_mac) {
@@ -700,6 +701,40 @@ config("compiler_cpu_abi") {
}
cflags += [ "-m${mips_float_abi}-float" ]
+ } else if (current_cpu == "mips" && !is_nacl) {
+ if (mips_arch_variant == "r6") {
+ cflags += [
+ "-mips32r6",
+ "-Wa,-mips32r6",
+ ]
+ if (mips_use_msa == true) {
+ cflags += [
+ "-mmsa",
+ "-mfp64",
+ ]
+ }
+ } else if (mips_arch_variant == "r2") {
+ 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 (mips_dsp_rev == 1) {
+ cflags += [ "-mdsp" ]
+ } else if (mips_dsp_rev == 2) {
+ cflags += [ "-mdspr2" ]
+ }
+
+ cflags += [ "-m${mips_float_abi}-float" ]
} else if (current_cpu == "mips64el") {
if (mips_arch_variant == "r6") {
if (is_clang) {
@@ -731,6 +766,26 @@ config("compiler_cpu_abi") {
]
ldflags += [ "-mips64r2" ]
}
+ } else if (current_cpu == "mips64") {
+ if (mips_arch_variant == "r6") {
+ cflags += [
+ "-mips64r6",
+ "-Wa,-mips64r6",
+ ]
+ ldflags += [ "-mips64r6" ]
+ if (mips_use_msa == true) {
+ cflags += [
+ "-mmsa",
+ "-mfp64",
+ ]
+ }
+ } else if (mips_arch_variant == "r2") {
+ cflags += [
+ "-mips64r2",
+ "-Wa,-mips64r2",
+ ]
+ ldflags += [ "-mips64r2" ]
+ }
} else if (current_cpu == "pnacl" && is_nacl_nonsfi) {
if (target_cpu == "x86" || target_cpu == "x64") {
cflags += [
@@ -1179,7 +1234,8 @@ config("chromium_code") {
if (!is_debug && !using_sanitizer &&
(!is_linux || !is_clang || is_official_build) &&
current_cpu != "s390x" && current_cpu != "s390" &&
- current_cpu != "ppc64" && current_cpu != "ppc64") {
+ current_cpu != "ppc64" && current_cpu != "ppc64" &&
+ current_cpu != "mips" && current_cpu != "mips64") {
# _FORTIFY_SOURCE isn't really supported by Clang now, see
# http://llvm.org/bugs/show_bug.cgi?id=16821.
# It seems to work fine with Ubuntu 12 headers though, so use it in
« no previous file with comments | « build/config/BUILDCONFIG.gn ('k') | build/config/mips.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698