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

Unified Diff: gn/BUILDCONFIG.gn

Issue 2275983004: GN: Android (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: note 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 | « gn/BUILD.gn ('k') | src/core/SkCpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gn/BUILDCONFIG.gn
diff --git a/gn/BUILDCONFIG.gn b/gn/BUILDCONFIG.gn
index d6833571c8a9c4e524a49ae671cb89f57114e398..6aa4451e598d6b5714369055df51bf67614b31af 100644
--- a/gn/BUILDCONFIG.gn
+++ b/gn/BUILDCONFIG.gn
@@ -8,11 +8,15 @@
declare_args() {
is_debug = true
is_component_build = false
+ ndk = ""
}
# Platform detection
if (target_os == "") {
target_os = host_os
+ if (ndk != "") {
+ target_os = "android"
+ }
}
if (current_os == "") {
current_os = target_os
@@ -20,6 +24,9 @@ if (current_os == "") {
if (target_cpu == "") {
target_cpu = host_cpu
+ if (ndk != "") {
+ target_cpu = "arm64"
+ }
}
if (current_cpu == "") {
current_cpu = target_cpu
@@ -34,6 +41,22 @@ is_win = current_os == "win"
is_posix = !is_win
+if (is_android) {
+ ndk_host = ""
+ ndk_target = ""
+ ndk_platform = ""
+ ndk_stdlib = ""
+
+ if (host_os == "linux" && host_cpu == "x64") {
+ ndk_host = "linux-x86_64"
+ }
+ if (target_cpu == "arm64") {
+ ndk_target = "aarch64-linux-android"
+ ndk_platform = "android-21/arch-arm64"
+ ndk_stdlib = "arm64-v8a"
+ }
+}
+
# A component is either a static or a shared library.
template("component") {
_component_mode = "static_library"
« no previous file with comments | « gn/BUILD.gn ('k') | src/core/SkCpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698