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

Side by Side Diff: build/config/android/config.gni

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « build/config/BUILDCONFIG.gn ('k') | build/config/android/internal_rules.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 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 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # This file contains common system config stuff for the Android build. 5 # This file contains common system config stuff for the Android build.
6 6
7 if (is_android) { 7 if (is_android) {
8 has_chrome_android_internal = 8 has_chrome_android_internal =
9 exec_script("//build/dir_exists.py", 9 exec_script("//build/dir_exists.py",
10 [ rebase_path("//clank", root_build_dir) ], 10 [ rebase_path("//clank", root_build_dir) ],
11 "string") == "True" 11 "string") == "True"
12 12
13 if (has_chrome_android_internal) { 13 if (has_chrome_android_internal) {
14 import("//clank/config.gni") 14 import("//clank/config.gni")
15 } 15 }
16 16
17 if (!defined(default_android_sdk_root)) { 17 if (!defined(default_android_sdk_root)) {
18 default_android_sdk_root = "//third_party/android_tools/sdk" 18 default_android_sdk_root = "//third_party/android_tools/sdk"
19 default_android_sdk_version = "21" 19 default_android_sdk_version = "21"
20 default_android_sdk_build_tools_version = "21.0.1" 20 default_android_sdk_build_tools_version = "21.0.1"
21 } 21 }
22 22
23 if (!defined(google_play_services_library)) {
24 google_play_services_library =
25 "//third_party/android_tools:google_play_services_default_java"
26 }
27
23 declare_args() { 28 declare_args() {
24 android_sdk_root = default_android_sdk_root 29 android_sdk_root = default_android_sdk_root
25 android_sdk_version = default_android_sdk_version 30 android_sdk_version = default_android_sdk_version
26 android_sdk_build_tools_version = default_android_sdk_build_tools_version 31 android_sdk_build_tools_version = default_android_sdk_build_tools_version
27 32
28 # This is set when building the Android WebView inside the Android build 33 # This is set when building the Android WebView inside the Android build
29 # system, using the 'android' gyp backend. The WebView code is still built 34 # system, using the 'android' gyp backend. The WebView code is still built
30 # when this is unset, but builds using the normal chromium build system. 35 # when this is unset, but builds using the normal chromium build system.
31 is_android_webview_build = false 36 is_android_webview_build = false
32 37
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 91
87 # Subdirectories inside android_ndk_root that contain the sysroot for the 92 # Subdirectories inside android_ndk_root that contain the sysroot for the
88 # associated platform. 93 # associated platform.
89 _android_api_level = 14 94 _android_api_level = 14
90 x86_android_sysroot_subdir = 95 x86_android_sysroot_subdir =
91 "platforms/android-${_android_api_level}/arch-x86" 96 "platforms/android-${_android_api_level}/arch-x86"
92 arm_android_sysroot_subdir = 97 arm_android_sysroot_subdir =
93 "platforms/android-${_android_api_level}/arch-arm" 98 "platforms/android-${_android_api_level}/arch-arm"
94 mips_android_sysroot_subdir = 99 mips_android_sysroot_subdir =
95 "platforms/android-${_android_api_level}/arch-mips" 100 "platforms/android-${_android_api_level}/arch-mips"
101 _android64_api_level = 21
102 x86_64_android_sysroot_subdir =
103 "platforms/android-${_android64_api_level}/arch-x86_64"
104 arm64_android_sysroot_subdir =
105 "platforms/android-${_android64_api_level}/arch-arm64"
106 mips64_android_sysroot_subdir =
107 "platforms/android-${_android64_api_level}/arch-mips64"
96 108
97 # Toolchain root directory for each build. The actual binaries are inside 109 # Toolchain root directory for each build. The actual binaries are inside
98 # a "bin" directory inside of these. 110 # a "bin" directory inside of these.
99 _android_toolchain_version = "4.9" 111 _android_toolchain_version = "4.9"
100 x86_android_toolchain_root = "$android_ndk_root/toolchains/x86-${_android_tool chain_version}/prebuilt/${android_host_os}-${android_host_arch}" 112 x86_android_toolchain_root = "$android_ndk_root/toolchains/x86-${_android_tool chain_version}/prebuilt/${android_host_os}-${android_host_arch}"
101 arm_android_toolchain_root = "$android_ndk_root/toolchains/arm-linux-androidea bi-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch }" 113 arm_android_toolchain_root = "$android_ndk_root/toolchains/arm-linux-androidea bi-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch }"
102 mips_android_toolchain_root = "$android_ndk_root/toolchains/mipsel-linux-andro id-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch }" 114 mips_android_toolchain_root = "$android_ndk_root/toolchains/mipsel-linux-andro id-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch }"
115 x86_64_android_toolchain_root = "$android_ndk_root/toolchains/x86_64-${_androi d_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}"
116 arm64_android_toolchain_root = "$android_ndk_root/toolchains/aarch64-${_androi d_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}"
117 mips64_android_toolchain_root = "$android_ndk_root/toolchains/mips64el-${_andr oid_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}"
103 118
104 # Location of libgcc. This is only needed for the current GN toolchain, so we 119 # Location of libgcc. This is only needed for the current GN toolchain, so we
105 # only need to define the current one, rather than one for every platform 120 # only need to define the current one, rather than one for every platform
106 # like the toolchain roots. 121 # like the toolchain roots.
107 if (cpu_arch == "x86") { 122 if (cpu_arch == "x86") {
108 android_prebuilt_arch = "android-x86" 123 android_prebuilt_arch = "android-x86"
109 _binary_prefix = "i686-linux-android" 124 _binary_prefix = "i686-linux-android"
110 android_toolchain_root = "$x86_android_toolchain_root" 125 android_toolchain_root = "$x86_android_toolchain_root"
111 android_libgcc_file = "$android_toolchain_root/lib/gcc/i686-linux-android/${ _android_toolchain_version}/libgcc.a" 126 android_libgcc_file = "$android_toolchain_root/lib/gcc/i686-linux-android/${ _android_toolchain_version}/libgcc.a"
112 } else if (cpu_arch == "arm") { 127 } else if (cpu_arch == "arm") {
113 android_prebuilt_arch = "android-arm" 128 android_prebuilt_arch = "android-arm"
114 _binary_prefix = "arm-linux-androideabi" 129 _binary_prefix = "arm-linux-androideabi"
115 android_toolchain_root = "$arm_android_toolchain_root" 130 android_toolchain_root = "$arm_android_toolchain_root"
116 android_libgcc_file = "$android_toolchain_root/lib/gcc/arm-linux-androideabi /${_android_toolchain_version}/libgcc.a" 131 android_libgcc_file = "$android_toolchain_root/lib/gcc/arm-linux-androideabi /${_android_toolchain_version}/libgcc.a"
117 } else if (cpu_arch == "mipsel") { 132 } else if (cpu_arch == "mipsel") {
118 android_prebuilt_arch = "android-mips" 133 android_prebuilt_arch = "android-mips"
119 _binary_prefix = "mipsel-linux-android" 134 _binary_prefix = "mipsel-linux-android"
120 android_toolchain_root = "$mips_android_toolchain_root" 135 android_toolchain_root = "$mips_android_toolchain_root"
121 android_libgcc_file = "$android_toolchain_root/lib/gcc/mipsel-linux-android/ ${_android_toolchain_version}/libgcc.a" 136 android_libgcc_file = "$android_toolchain_root/lib/gcc/mipsel-linux-android/ ${_android_toolchain_version}/libgcc.a"
137 } else if (cpu_arch == "x64") {
138 android_prebuilt_arch = "android-x86_64"
139 _binary_prefix = "x86_64-linux-android"
140 android_toolchain_root = "$x86_64_android_toolchain_root"
141 android_libgcc_file = "$android_toolchain_root/lib/gcc/x86_64-linux-android/ ${_android_toolchain_version}/libgcc.a"
142 } else if (cpu_arch == "arm64") {
143 android_prebuilt_arch = "android-arm64"
144 _binary_prefix = "aarch64-linux-android"
145 android_toolchain_root = "$arm64_android_toolchain_root"
146 android_libgcc_file = "$android_toolchain_root/lib/gcc/aarch64-linux-android /${_android_toolchain_version}/libgcc.a"
147 } else if (cpu_arch == "mips64el") {
148 android_prebuilt_arch = "android-mips64"
149 _binary_prefix = "mips64el-linux-android"
150 android_toolchain_root = "$mips64_android_toolchain_root"
151 android_libgcc_file = "$android_toolchain_root/lib/gcc/mips64el-linux-androi d/${_android_toolchain_version}/libgcc.a"
122 } else { 152 } else {
123 assert(false, "Need android libgcc support for your target arch.") 153 assert(false, "Need android libgcc support for your target arch.")
124 } 154 }
125 155
126 android_tool_prefix = "$android_toolchain_root/bin/$_binary_prefix-" 156 android_tool_prefix = "$android_toolchain_root/bin/$_binary_prefix-"
127 android_readelf = "${android_tool_prefix}readelf" 157 android_readelf = "${android_tool_prefix}readelf"
128 android_objcopy = "${android_tool_prefix}objcopy" 158 android_objcopy = "${android_tool_prefix}objcopy"
129 android_gdbserver = 159 android_gdbserver =
130 "$android_ndk_root/prebuilt/$android_prebuilt_arch/gdbserver/gdbserver" 160 "$android_ndk_root/prebuilt/$android_prebuilt_arch/gdbserver/gdbserver"
131 161
162 # stlport stuff --------------------------------------------------------------
163
164 if (component_mode == "shared_library") {
165 android_stlport_library = "stlport_shared"
166 } else {
167 android_stlport_library = "stlport_static"
168 }
169
132 # ABI ------------------------------------------------------------------------ 170 # ABI ------------------------------------------------------------------------
133 171
134 if (cpu_arch == "x86") { 172 if (cpu_arch == "x86") {
135 android_app_abi = "x86" 173 android_app_abi = "x86"
136 } else if (cpu_arch == "arm") { 174 } else if (cpu_arch == "arm") {
137 import("//build/config/arm.gni") 175 import("//build/config/arm.gni")
138 if (arm_version < 7) { 176 if (arm_version < 7) {
139 android_app_abi = "armeabi" 177 android_app_abi = "armeabi"
140 } else { 178 } else {
141 android_app_abi = "armeabi-v7a" 179 android_app_abi = "armeabi-v7a"
142 } 180 }
143 } else if (cpu_arch == "mipsel") { 181 } else if (cpu_arch == "mipsel") {
144 android_app_abi = "mips" 182 android_app_abi = "mips"
183 } else if (cpu_arch == "x64") {
184 android_app_abi = "x86_64"
185 } else if (cpu_arch == "arm64") {
186 android_app_abi = "arm64-v8a"
187 } else if (cpu_arch == "mips64el") {
188 android_app_abi = "mips64"
145 } else { 189 } else {
146 assert(false, "Unknown Android ABI: " + cpu_arch) 190 assert(false, "Unknown Android ABI: " + cpu_arch)
147 } 191 }
148 } else { 192 } else {
149 if (!defined(is_android_webview_build)) { 193 if (!defined(is_android_webview_build)) {
150 is_android_webview_build = false 194 is_android_webview_build = false
151 } 195 }
152 } 196 }
OLDNEW
« no previous file with comments | « build/config/BUILDCONFIG.gn ('k') | build/config/android/internal_rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698