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

Unified Diff: gn/BUILDCONFIG.gn

Issue 2336343002: GN: Android Vulkan support (Closed)
Patch Set: simpler Created 4 years, 3 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/shared_sources.gni » ('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 1ef121a823b6c3cf4a1016ded11c236fe7b0295c..e6a8b695ffe29f5a363baed6330ead29674b0646 100644
--- a/gn/BUILDCONFIG.gn
+++ b/gn/BUILDCONFIG.gn
@@ -9,6 +9,7 @@ declare_args() {
is_debug = true
is_component_build = false
ndk = ""
+ ndk_api = 0 # 0 == picked automatically for target_cpu.
sanitize = ""
}
@@ -45,7 +46,15 @@ if (is_android) {
ndk_target = ""
ndk_platform = ""
ndk_stdlib = ""
- nkd_gccdir = ""
+ ndk_gccdir = ""
+
+ if (ndk_api == 0) {
+ ndk_api = 18
+ if (target_cpu == "arm64" || target_cpu == "mips64el" ||
+ target_cpu == "x64") {
+ ndk_api = 21
+ }
+ }
if (host_os == "linux") {
ndk_host = "linux-x86_64"
@@ -55,32 +64,32 @@ if (is_android) {
if (target_cpu == "arm64") {
ndk_target = "aarch64-linux-android"
- ndk_platform = "android-21/arch-arm64"
+ ndk_platform = "android-${ndk_api}/arch-arm64"
ndk_stdlib = "arm64-v8a"
ndk_gccdir = ndk_target
} else if (target_cpu == "arm") {
ndk_target = "arm-linux-androideabi"
- ndk_platform = "android-18/arch-arm"
+ ndk_platform = "android-${ndk_api}/arch-arm"
ndk_stdlib = "armeabi-v7a"
ndk_gccdir = ndk_target
} else if (target_cpu == "mips64el") {
ndk_target = "mips64el-linux-android"
- ndk_platform = "android-21/arch-mips64"
+ ndk_platform = "android-${ndk_api}/arch-mips64"
ndk_stdlib = "mips64"
ndk_gccdir = ndk_target
} else if (target_cpu == "mipsel") {
ndk_target = "mipsel-linux-android"
- ndk_platform = "android-18/arch-mips"
+ ndk_platform = "android-${ndk_api}/arch-mips"
ndk_stdlib = "mips"
ndk_gccdir = ndk_target
} else if (target_cpu == "x64") {
ndk_target = "x86_64-linux-android"
- ndk_platform = "android-21/arch-x86_64"
+ ndk_platform = "android-${ndk_api}/arch-x86_64"
ndk_stdlib = "x86_64"
ndk_gccdir = ndk_stdlib
} else if (target_cpu == "x86") {
ndk_target = "i686-linux-android"
- ndk_platform = "android-18/arch-x86"
+ ndk_platform = "android-${ndk_api}/arch-x86"
ndk_stdlib = "x86"
ndk_gccdir = ndk_stdlib
}
« no previous file with comments | « BUILD.gn ('k') | gn/shared_sources.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698