Upstream version 5.34.92.0
[platform/framework/web/crosswalk.git] / src / build / config / android / config.gni
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 # This file contains common system config stuff for the Android build.
6 if (is_android) {
7   declare_args() {
8     android_src = ""
9
10     # This is set when building the Android WebView inside the Android build
11     # system, using the 'android' gyp backend. The WebView code is still built
12     # when this is unset, but builds using the normal chromium build system.
13     is_android_webview_build = false
14   }
15
16   if (is_android_webview_build) {
17     assert(android_src != "",
18            "You must specify android_src for an Android WebView build.")
19   }
20
21   # android_ndk_root -----------------------------------------------------------
22
23   # Full system path to the Android NDK.
24   android_ndk_root =
25     rebase_path("//third_party/android_tools/ndk", ".", "")
26
27   # stlport stuff --------------------------------------------------------------
28
29   use_system_stlport = is_android_webview_build
30
31   if (use_system_stlport) {
32     android_stlport_library = "stlport"
33   } else if (component_mode == "shared_library") {
34     android_stlport_library = "stlport_shared"
35   } else {
36     android_stlport_library = "stlport_static"
37   }
38
39   # ABI ------------------------------------------------------------------------
40
41   if (cpu_arch == "x86") {
42     android_app_abi = "x86"
43   } else if (cpu_arch == "arm") {
44     import("//build/config/arm.gni")
45     if (arm_version < 7) {
46       android_app_abi = "armeabi"
47     } else {
48       android_app_abi = "armeabi-v7a"
49     }
50   } else if (cpu_arch == "mipsel") {
51     android_app_abi = "mips"
52   } else {
53     assert(false, "Unknown Android ABI")
54   }
55 } else {
56   if (!defined(is_android_webview_build)) {
57     is_android_webview_build = false
58   }
59   use_system_stlport = false
60 }