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

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

Issue 2030003002: MIPS64: Add clang compile flags for MIPS64r6 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/android/BUILD.gn ('k') | 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 2f107f7d3bc3d83d578a93a1d9cd4a53c1292eb2..92e2dba3128f2c82922b370b95c5f8b3f8673764 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -342,7 +342,8 @@ config("compiler") {
# Gold is the default linker for the bundled binutils so we explicitly
# enable the bfd linker when use_gold is not set.
ldflags += [ "-fuse-ld=bfd" ]
- } else if (is_android && current_cpu == "mipsel" && is_clang) {
+ } else if (is_android && is_clang &&
+ (current_cpu == "mipsel" || current_cpu == "mips64el")) {
# Let clang find the ld.bfd in the NDK.
_rebased_android_toolchain_root =
rebase_path(android_toolchain_root, root_build_dir)
@@ -618,11 +619,22 @@ config("compiler_cpu_abi") {
cflags += [ "-m${mips_float_abi}-float" ]
} else if (current_cpu == "mips64el") {
if (mips_arch_variant == "r6") {
- cflags += [
- "-mips64r6",
- "-Wa,-mips64r6",
- ]
- ldflags += [ "-mips64r6" ]
+ if (is_clang) {
+ if (is_android) {
+ cflags += [
+ "--target=mips64el-linux-android",
+ "-march=mips64el",
+ "-mcpu=mips64r6",
+ ]
+ ldflags += [ "--target=mips64el-linux-android" ]
+ }
+ } else {
+ cflags += [
+ "-mips64r6",
+ "-Wa,-mips64r6",
+ ]
+ ldflags += [ "-mips64r6" ]
+ }
} else if (mips_arch_variant == "r2") {
cflags += [
"-mips64r2",
« no previous file with comments | « build/config/android/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698