OLD | NEW |
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 import("//build/config/android/secondary_abi.gni") |
| 8 |
7 if (is_android) { | 9 if (is_android) { |
8 assert(rebase_path("//", root_build_dir) == "../../", | 10 assert(rebase_path("//", root_build_dir) == "../../", |
9 "Android output directory must be nested 2 levels within src/ (" + | 11 "Android output directory must be nested 2 levels within src/ (" + |
10 "e.g.: out-gn/Debug). http://crbug.com/412935") | 12 "e.g.: out-gn/Debug). http://crbug.com/412935") |
11 | 13 |
12 import("//build_overrides/build.gni") | 14 import("//build_overrides/build.gni") |
13 | 15 |
14 # Disable all java-related templates in secondary toolchains. Java is not | 16 # Disable all java-related templates in secondary toolchains. Java is not |
15 # toolchain-dependent, so a variation on toolchains is likely a mistake. | 17 # toolchain-dependent, so a variation on toolchains is likely a mistake. |
16 if (enable_java_templates) { | 18 #if (enable_java_templates) { |
17 assert(current_toolchain == default_toolchain, | 19 # assert(current_toolchain == default_toolchain, |
18 "Android templates should be used only by the default toolchain.") | 20 # "Android templates should be used only by the default toolchain.") |
19 } | 21 #} |
20 | 22 |
21 has_chrome_android_internal = | 23 has_chrome_android_internal = |
22 exec_script("//build/dir_exists.py", | 24 exec_script("//build/dir_exists.py", |
23 [ rebase_path("//clank", root_build_dir) ], | 25 [ rebase_path("//clank", root_build_dir) ], |
24 "string") == "True" | 26 "string") == "True" |
25 | 27 |
26 if (has_chrome_android_internal) { | 28 if (has_chrome_android_internal) { |
27 import("//clank/config.gni") | 29 import("//clank/config.gni") |
28 } | 30 } |
29 | 31 |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 android_objcopy = "${android_tool_prefix}objcopy" | 254 android_objcopy = "${android_tool_prefix}objcopy" |
253 android_gdbserver = | 255 android_gdbserver = |
254 "$android_ndk_root/prebuilt/$android_prebuilt_arch/gdbserver/gdbserver" | 256 "$android_ndk_root/prebuilt/$android_prebuilt_arch/gdbserver/gdbserver" |
255 | 257 |
256 # Toolchain stuff ------------------------------------------------------------ | 258 # Toolchain stuff ------------------------------------------------------------ |
257 | 259 |
258 android_libcpp_root = "$android_ndk_root/sources/cxx-stl/llvm-libc++" | 260 android_libcpp_root = "$android_ndk_root/sources/cxx-stl/llvm-libc++" |
259 | 261 |
260 # ABI ------------------------------------------------------------------------ | 262 # ABI ------------------------------------------------------------------------ |
261 | 263 |
262 # Intentionally do not define android_app_secondary_abi for 64-bit | 264 # Intentionally do not define android_app_secondary_abi for 32-bit |
263 # android_app_abi, since they are not used. | 265 # android_app_abi, since they are not used. |
264 if (current_cpu == "x86") { | 266 if (current_cpu == "x86") { |
265 android_app_abi = "x86" | 267 android_app_abi = "x86" |
266 android_app_secondary_abi = "x86_64" | |
267 } else if (current_cpu == "arm") { | 268 } else if (current_cpu == "arm") { |
268 import("//build/config/arm.gni") | 269 import("//build/config/arm.gni") |
269 if (arm_version < 7) { | 270 if (arm_version < 7) { |
270 android_app_abi = "armeabi" | 271 android_app_abi = "armeabi" |
271 } else { | 272 } else { |
272 android_app_abi = "armeabi-v7a" | 273 android_app_abi = "armeabi-v7a" |
273 } | 274 } |
274 android_app_secondary_abi = "arm64-v8a" | |
275 } else if (current_cpu == "mipsel") { | 275 } else if (current_cpu == "mipsel") { |
276 android_app_abi = "mips" | 276 android_app_abi = "mips" |
277 android_app_secondary_abi = "mips64" | |
278 } else if (current_cpu == "x64") { | 277 } else if (current_cpu == "x64") { |
279 android_app_abi = "x86_64" | 278 android_app_abi = "x86_64" |
| 279 android_app_secondary_abi = "x86" |
280 } else if (current_cpu == "arm64") { | 280 } else if (current_cpu == "arm64") { |
281 android_app_abi = "arm64-v8a" | 281 android_app_abi = "arm64-v8a" |
| 282 android_app_secondary_abi = "armeabi-v7a" |
282 } else if (current_cpu == "mips64el") { | 283 } else if (current_cpu == "mips64el") { |
283 android_app_abi = "mips64" | 284 android_app_abi = "mips64" |
| 285 android_app_secondary_abi = "mips" |
284 } else { | 286 } else { |
285 assert(false, "Unknown Android ABI: " + current_cpu) | 287 assert(false, "Unknown Android ABI: " + current_cpu) |
286 } | 288 } |
287 | 289 |
288 if (android_libcpp_lib_dir == "") { | 290 if (android_libcpp_lib_dir == "") { |
289 android_libcpp_lib_dir = "${android_libcpp_root}/libs/${android_app_abi}" | 291 android_libcpp_lib_dir = "${android_libcpp_root}/libs/${android_app_abi}" |
290 } | 292 } |
291 } | 293 } |
OLD | NEW |