| 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 if (is_android) { | 7 if (is_android) { |
| 8 has_chrome_android_internal = exec_script("//build/dir_exists.py", | 8 has_chrome_android_internal = |
| 9 [ rebase_path("//clank", root_build_dir) ], | 9 exec_script("//build/dir_exists.py", |
| 10 "string") == "True" | 10 [ rebase_path("//clank", root_build_dir) ], |
| 11 "string") == "True" |
| 11 | 12 |
| 12 if (has_chrome_android_internal) { | 13 if (has_chrome_android_internal) { |
| 13 import("//clank/config.gni") | 14 import("//clank/config.gni") |
| 14 } else { | 15 } else { |
| 15 default_android_sdk_root = "//third_party/android_tools/sdk" | 16 default_android_sdk_root = "//third_party/android_tools/sdk" |
| 16 default_android_sdk_version = "21" | 17 default_android_sdk_version = "21" |
| 17 default_android_sdk_build_tools_version = "21.0.1" | 18 default_android_sdk_build_tools_version = "21.0.1" |
| 18 } | 19 } |
| 19 | 20 |
| 20 declare_args() { | 21 declare_args() { |
| 21 android_sdk_root = default_android_sdk_root | 22 android_sdk_root = default_android_sdk_root |
| 22 android_sdk_version = default_android_sdk_version | 23 android_sdk_version = default_android_sdk_version |
| 23 android_sdk_build_tools_version = default_android_sdk_build_tools_version | 24 android_sdk_build_tools_version = default_android_sdk_build_tools_version |
| 24 | 25 |
| 25 # This is set when building the Android WebView inside the Android build | 26 # This is set when building the Android WebView inside the Android build |
| 26 # system, using the 'android' gyp backend. The WebView code is still built | 27 # system, using the 'android' gyp backend. The WebView code is still built |
| 27 # when this is unset, but builds using the normal chromium build system. | 28 # when this is unset, but builds using the normal chromium build system. |
| 28 is_android_webview_build = false | 29 is_android_webview_build = false |
| 29 | 30 |
| 30 android_default_keystore_path = "//build/android/ant/chromium-debug.keystore
" | 31 android_default_keystore_path = |
| 32 "//build/android/ant/chromium-debug.keystore" |
| 31 android_default_keystore_name = "chromiumdebugkey" | 33 android_default_keystore_name = "chromiumdebugkey" |
| 32 android_default_keystore_password = "chromium" | 34 android_default_keystore_password = "chromium" |
| 33 | 35 |
| 34 # This is a unique identifier for a given build. It's used for | 36 # This is a unique identifier for a given build. It's used for |
| 35 # identifying various build artifacts corresponding to a particular build of | 37 # identifying various build artifacts corresponding to a particular build of |
| 36 # chrome (e.g. where to find archived symbols). | 38 # chrome (e.g. where to find archived symbols). |
| 37 android_chrome_build_id = "\"\"" | 39 android_chrome_build_id = "\"\"" |
| 38 } | 40 } |
| 39 | 41 |
| 40 # ABI ------------------------------------------------------------------------ | 42 # ABI ------------------------------------------------------------------------ |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 | 84 |
| 83 android_sdk = "${android_sdk_root}/platforms/android-${android_sdk_version}" | 85 android_sdk = "${android_sdk_root}/platforms/android-${android_sdk_version}" |
| 84 | 86 |
| 85 # Path to the Android NDK and SDK. | 87 # Path to the Android NDK and SDK. |
| 86 android_ndk_root = "//third_party/android_tools/ndk" | 88 android_ndk_root = "//third_party/android_tools/ndk" |
| 87 android_ndk_include_dir = "$android_ndk_root/usr/include" | 89 android_ndk_include_dir = "$android_ndk_root/usr/include" |
| 88 | 90 |
| 89 android_sdk = "${android_sdk_root}/platforms/android-${android_sdk_version}" | 91 android_sdk = "${android_sdk_root}/platforms/android-${android_sdk_version}" |
| 90 | 92 |
| 91 android_sdk_tools = "${android_sdk_root}/tools" | 93 android_sdk_tools = "${android_sdk_root}/tools" |
| 92 android_sdk_build_tools = "${android_sdk_root}/build-tools/$android_sdk_build_
tools_version" | 94 android_sdk_build_tools = |
| 95 "${android_sdk_root}/build-tools/$android_sdk_build_tools_version" |
| 93 | 96 |
| 94 # Path to the SDK's android.jar | 97 # Path to the SDK's android.jar |
| 95 android_sdk_jar = "$android_sdk/android.jar" | 98 android_sdk_jar = "$android_sdk/android.jar" |
| 96 | 99 |
| 97 zipalign_path = "$android_sdk_build_tools/zipalign" | 100 zipalign_path = "$android_sdk_build_tools/zipalign" |
| 98 | 101 |
| 99 # Subdirectories inside android_ndk_root that contain the sysroot for the | 102 # Subdirectories inside android_ndk_root that contain the sysroot for the |
| 100 # associated platform. | 103 # associated platform. |
| 101 _android_api_level = 14 | 104 _android_api_level = 14 |
| 102 x86_android_sysroot_subdir = "platforms/android-${_android_api_level}/arch-x86
" | 105 x86_android_sysroot_subdir = |
| 103 arm_android_sysroot_subdir = "platforms/android-${_android_api_level}/arch-arm
" | 106 "platforms/android-${_android_api_level}/arch-x86" |
| 104 mips_android_sysroot_subdir = "platforms/android-${_android_api_level}/arch-mi
ps" | 107 arm_android_sysroot_subdir = |
| 108 "platforms/android-${_android_api_level}/arch-arm" |
| 109 mips_android_sysroot_subdir = |
| 110 "platforms/android-${_android_api_level}/arch-mips" |
| 105 | 111 |
| 106 # Toolchain root directory for each build. The actual binaries are inside | 112 # Toolchain root directory for each build. The actual binaries are inside |
| 107 # a "bin" directory inside of these. | 113 # a "bin" directory inside of these. |
| 108 _android_toolchain_version = "4.9" | 114 _android_toolchain_version = "4.9" |
| 109 x86_android_toolchain_root = "$android_ndk_root/toolchains/x86-${_android_tool
chain_version}/prebuilt/${android_host_os}-${android_host_arch}" | 115 x86_android_toolchain_root = |
| 110 arm_android_toolchain_root = "$android_ndk_root/toolchains/arm-linux-androidea
bi-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch
}" | 116 "$android_ndk_root/toolchains/x86-${_android_toolchain_version}/prebuilt/$
{android_host_os}-${android_host_arch}" |
| 111 mips_android_toolchain_root = "$android_ndk_root/toolchains/mipsel-linux-andro
id-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch
}" | 117 arm_android_toolchain_root = |
| 118 "$android_ndk_root/toolchains/arm-linux-androideabi-${_android_toolchain_v
ersion}/prebuilt/${android_host_os}-${android_host_arch}" |
| 119 mips_android_toolchain_root = |
| 120 "$android_ndk_root/toolchains/mipsel-linux-android-${_android_toolchain_ve
rsion}/prebuilt/${android_host_os}-${android_host_arch}" |
| 112 | 121 |
| 113 # Location of libgcc. This is only needed for the current GN toolchain, so we | 122 # Location of libgcc. This is only needed for the current GN toolchain, so we |
| 114 # only need to define the current one, rather than one for every platform | 123 # only need to define the current one, rather than one for every platform |
| 115 # like the toolchain roots. | 124 # like the toolchain roots. |
| 116 if (cpu_arch == "x86") { | 125 if (cpu_arch == "x86") { |
| 117 android_prebuilt_arch = "android-x86" | 126 android_prebuilt_arch = "android-x86" |
| 118 _binary_prefix = "i686-linux-android" | 127 _binary_prefix = "i686-linux-android" |
| 119 android_toolchain_root = "$x86_android_toolchain_root" | 128 android_toolchain_root = "$x86_android_toolchain_root" |
| 120 android_libgcc_file = | 129 android_libgcc_file = |
| 121 "$android_toolchain_root/lib/gcc/i686-linux-android/${_android_toolchain_v
ersion}/libgcc.a" | 130 "$android_toolchain_root/lib/gcc/i686-linux-android/${_android_toolchain
_version}/libgcc.a" |
| 122 } else if (cpu_arch == "arm") { | 131 } else if (cpu_arch == "arm") { |
| 123 android_prebuilt_arch = "android-arm" | 132 android_prebuilt_arch = "android-arm" |
| 124 _binary_prefix = "arm-linux-androideabi" | 133 _binary_prefix = "arm-linux-androideabi" |
| 125 android_toolchain_root = "$arm_android_toolchain_root" | 134 android_toolchain_root = "$arm_android_toolchain_root" |
| 126 if (arm_use_thumb) { | 135 if (arm_use_thumb) { |
| 127 android_libgcc_file = | 136 android_libgcc_file = |
| 128 "$android_toolchain_root/lib/gcc/arm-linux-androideabi/${_android_toolch
ain_version}/thumb/libgcc.a" | 137 "$android_toolchain_root/lib/gcc/arm-linux-androideabi/${_android_tool
chain_version}/thumb/libgcc.a" |
| 129 } else { | 138 } else { |
| 130 android_libgcc_file = | 139 android_libgcc_file = |
| 131 "$android_toolchain_root/lib/gcc/arm-linux-androideabi/${_android_toolch
ain_version}/libgcc.a" | 140 "$android_toolchain_root/lib/gcc/arm-linux-androideabi/${_android_tool
chain_version}/libgcc.a" |
| 132 } | 141 } |
| 133 } else if (cpu_arch == "mipsel") { | 142 } else if (cpu_arch == "mipsel") { |
| 134 android_prebuilt_arch = "android-mips" | 143 android_prebuilt_arch = "android-mips" |
| 135 _binary_prefix = "mipsel-linux-android" | 144 _binary_prefix = "mipsel-linux-android" |
| 136 android_toolchain_root = "$mips_android_toolchain_root" | 145 android_toolchain_root = "$mips_android_toolchain_root" |
| 137 android_libgcc_file = | 146 android_libgcc_file = |
| 138 "$android_toolchain_root/lib/gcc/mipsel-linux-android/${_android_toolchain
_version}/libgcc.a" | 147 "$android_toolchain_root/lib/gcc/mipsel-linux-android/${_android_toolcha
in_version}/libgcc.a" |
| 139 } else { | 148 } else { |
| 140 assert(false, "Need android libgcc support for your target arch.") | 149 assert(false, "Need android libgcc support for your target arch.") |
| 141 } | 150 } |
| 142 | 151 |
| 143 android_tool_prefix = "$android_toolchain_root/bin/$_binary_prefix-" | 152 android_tool_prefix = "$android_toolchain_root/bin/$_binary_prefix-" |
| 144 android_readelf = "${android_tool_prefix}readelf" | 153 android_readelf = "${android_tool_prefix}readelf" |
| 145 android_objcopy = "${android_tool_prefix}objcopy" | 154 android_objcopy = "${android_tool_prefix}objcopy" |
| 146 android_gdbserver = "$android_ndk_root/prebuilt/$android_prebuilt_arch/gdbserv
er/gdbserver" | 155 android_gdbserver = |
| 156 "$android_ndk_root/prebuilt/$android_prebuilt_arch/gdbserver/gdbserver" |
| 147 | 157 |
| 148 # stlport stuff -------------------------------------------------------------- | 158 # stlport stuff -------------------------------------------------------------- |
| 149 | 159 |
| 150 if (component_mode == "shared_library") { | 160 if (component_mode == "shared_library") { |
| 151 android_stlport_library = "stlport_shared" | 161 android_stlport_library = "stlport_shared" |
| 152 } else { | 162 } else { |
| 153 android_stlport_library = "stlport_static" | 163 android_stlport_library = "stlport_static" |
| 154 } | 164 } |
| 155 } else { | 165 } else { |
| 156 if (!defined(is_android_webview_build)) { | 166 if (!defined(is_android_webview_build)) { |
| 157 is_android_webview_build = false | 167 is_android_webview_build = false |
| 158 } | 168 } |
| 159 } | 169 } |
| OLD | NEW |