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

Unified Diff: BUILD.gn

Issue 2913353004: MIPS[64]: Add support for big endian build using GN (Closed)
Patch Set: 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 | « no previous file | snapshot_toolchain.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: BUILD.gn
diff --git a/BUILD.gn b/BUILD.gn
index c1352e3e4df4610666bbc07387e3d6c2e7e72a1e..ab593c68c7391504be68d944a41331bdb91196f3 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -327,8 +327,7 @@ config("toolchain") {
defines += [ "_MIPS_TARGET_SIMULATOR" ]
}
- # TODO(jochen): Add support for mips.
- if (v8_current_cpu == "mipsel") {
+ if (v8_current_cpu == "mipsel" || v8_current_cpu == "mips") {
defines += [ "V8_TARGET_ARCH_MIPS" ]
if (v8_can_use_fpu_instructions) {
defines += [ "CAN_USE_FPU_INSTRUCTIONS" ]
@@ -362,15 +361,17 @@ config("toolchain") {
# TODO(jochen): Add support for mips_arch_variant rx and loongson.
}
- # TODO(jochen): Add support for mips64.
- if (v8_current_cpu == "mips64el") {
+ if (v8_current_cpu == "mips64el" || v8_current_cpu == "mips64") {
defines += [ "V8_TARGET_ARCH_MIPS64" ]
if (v8_can_use_fpu_instructions) {
defines += [ "CAN_USE_FPU_INSTRUCTIONS" ]
}
- # TODO(jochen): Add support for big endian host byteorder.
- defines += [ "V8_TARGET_ARCH_MIPS64_LE" ]
+ if (host_byteorder == "little") {
+ defines += [ "V8_TARGET_ARCH_MIPS64_LE" ]
+ } else if (host_byteorder == "big") {
+ defines += [ "V8_TARGET_ARCH_MIPS64_BE" ]
+ }
if (v8_use_mips_abi_hardfloat) {
defines += [
"__mips_hard_float=1",
« no previous file with comments | « no previous file | snapshot_toolchain.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698