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

Unified Diff: gn/BUILD.gn

Issue 2279703003: GN: mac host and armv7 target (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: mips for real Created 4 years, 4 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.gn ('k') | gn/BUILDCONFIG.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gn/BUILD.gn
diff --git a/gn/BUILD.gn b/gn/BUILD.gn
index 0a56fa206f66facdfa400e883d070c4c2bd52de2..fc518ffc594267e7fab65ec66b522125e78efda4 100644
--- a/gn/BUILD.gn
+++ b/gn/BUILD.gn
@@ -4,10 +4,12 @@
# found in the LICENSE file.
declare_args() {
+ ar = "ar"
cc = "cc"
cxx = "c++"
if (is_android) {
+ ar = "$ndk/toolchains/$ndk_gccdir-4.9/prebuilt/$ndk_host/$ndk_target/bin/ar"
cc = "$ndk/toolchains/llvm/prebuilt/$ndk_host/bin/clang"
cxx = "$ndk/toolchains/llvm/prebuilt/$ndk_host/bin/clang++"
}
@@ -48,14 +50,27 @@ config("default") {
"-Wnon-virtual-dtor",
]
if (current_cpu == "arm") {
- cflags += [ "-mfpu=neon" ]
+ cflags += [
+ "-march=armv7-a",
+ "-mfpu=neon",
+ "-mthumb",
+ ]
+ } else if (current_cpu == "mipsel") {
+ cflags += [
+ "-march=mips32r2",
+ "-mdspr2",
+ ]
}
if (is_android) {
- asmflags = [ "--target=$ndk_target" ]
+ asmflags = [
+ "--target=$ndk_target",
+ "-B$ndk/toolchains/$ndk_gccdir-4.9/prebuilt/$ndk_host/$ndk_target/bin",
+ ]
cflags += [
"--sysroot=$ndk/platforms/$ndk_platform",
"--target=$ndk_target",
+ "-B$ndk/toolchains/$ndk_gccdir-4.9/prebuilt/$ndk_host/$ndk_target/bin",
]
cflags_cc += [
"-isystem$ndk/sources/android/support/include",
@@ -64,12 +79,12 @@ config("default") {
ldflags = [
"--sysroot=$ndk/platforms/$ndk_platform",
"--target=$ndk_target",
- "-B$ndk/toolchains/$ndk_target-4.9/prebuilt/$ndk_host/$ndk_target/bin",
+ "-B$ndk/toolchains/$ndk_gccdir-4.9/prebuilt/$ndk_host/$ndk_target/bin",
"-pie",
]
lib_dirs = [
"$ndk/sources/cxx-stl/llvm-libc++/libs/$ndk_stdlib",
- "$ndk/toolchains/$ndk_target-4.9/prebuilt/$ndk_host/lib/gcc/$ndk_target/4.9.x",
+ "$ndk/toolchains/$ndk_gccdir-4.9/prebuilt/$ndk_host/lib/gcc/$ndk_target/4.9.x",
]
libs = [
# Order matters here! Keep these three in exactly this order.
@@ -77,6 +92,9 @@ config("default") {
"c++abi",
"android_support",
]
+ if (target_cpu == "arm") {
+ libs += [ "unwind" ]
+ }
}
if (is_linux) {
@@ -136,13 +154,13 @@ toolchain("gcc_like") {
}
tool("alink") {
- command = "rm -f {{output}} && ar rcs {{output}} {{inputs}}"
+ command = "rm -f {{output}} && $ar rcs {{output}} {{inputs}}"
outputs = [
"{{root_out_dir}}/{{target_output_name}}{{output_extension}}",
]
default_output_extension = ".a"
output_prefix = "lib"
- description = "ar {{output}} ..."
+ description = "$ar {{output}} ..."
}
tool("solink") {
« no previous file with comments | « BUILD.gn ('k') | gn/BUILDCONFIG.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698