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 = | 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) ], |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 86 |
87 # Subdirectories inside android_ndk_root that contain the sysroot for the | 87 # Subdirectories inside android_ndk_root that contain the sysroot for the |
88 # associated platform. | 88 # associated platform. |
89 _android_api_level = 14 | 89 _android_api_level = 14 |
90 x86_android_sysroot_subdir = | 90 x86_android_sysroot_subdir = |
91 "platforms/android-${_android_api_level}/arch-x86" | 91 "platforms/android-${_android_api_level}/arch-x86" |
92 arm_android_sysroot_subdir = | 92 arm_android_sysroot_subdir = |
93 "platforms/android-${_android_api_level}/arch-arm" | 93 "platforms/android-${_android_api_level}/arch-arm" |
94 mips_android_sysroot_subdir = | 94 mips_android_sysroot_subdir = |
95 "platforms/android-${_android_api_level}/arch-mips" | 95 "platforms/android-${_android_api_level}/arch-mips" |
| 96 _android64_api_level = 21 |
| 97 x86_64_android_sysroot_subdir = |
| 98 "platforms/android-${_android64_api_level}/arch-x86_64" |
| 99 arm64_android_sysroot_subdir = |
| 100 "platforms/android-${_android64_api_level}/arch-arm64" |
| 101 mips64_android_sysroot_subdir = |
| 102 "platforms/android-${_android64_api_level}/arch-mips64" |
96 | 103 |
97 # Toolchain root directory for each build. The actual binaries are inside | 104 # Toolchain root directory for each build. The actual binaries are inside |
98 # a "bin" directory inside of these. | 105 # a "bin" directory inside of these. |
99 _android_toolchain_version = "4.9" | 106 _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}" | 107 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
}" | 108 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
}" | 109 mips_android_toolchain_root = "$android_ndk_root/toolchains/mipsel-linux-andro
id-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch
}" |
| 110 x86_64_android_toolchain_root = "$android_ndk_root/toolchains/x86_64-${_androi
d_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}" |
| 111 arm64_android_toolchain_root = "$android_ndk_root/toolchains/aarch64-${_androi
d_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}" |
| 112 mips64_android_toolchain_root = "$android_ndk_root/toolchains/mips64el-${_andr
oid_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}" |
103 | 113 |
104 # Location of libgcc. This is only needed for the current GN toolchain, so we | 114 # 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 | 115 # only need to define the current one, rather than one for every platform |
106 # like the toolchain roots. | 116 # like the toolchain roots. |
107 if (cpu_arch == "x86") { | 117 if (cpu_arch == "x86") { |
108 android_prebuilt_arch = "android-x86" | 118 android_prebuilt_arch = "android-x86" |
109 _binary_prefix = "i686-linux-android" | 119 _binary_prefix = "i686-linux-android" |
110 android_toolchain_root = "$x86_android_toolchain_root" | 120 android_toolchain_root = "$x86_android_toolchain_root" |
111 android_libgcc_file = "$android_toolchain_root/lib/gcc/i686-linux-android/${
_android_toolchain_version}/libgcc.a" | 121 android_libgcc_file = "$android_toolchain_root/lib/gcc/i686-linux-android/${
_android_toolchain_version}/libgcc.a" |
112 } else if (cpu_arch == "arm") { | 122 } else if (cpu_arch == "arm") { |
113 android_prebuilt_arch = "android-arm" | 123 android_prebuilt_arch = "android-arm" |
114 _binary_prefix = "arm-linux-androideabi" | 124 _binary_prefix = "arm-linux-androideabi" |
115 android_toolchain_root = "$arm_android_toolchain_root" | 125 android_toolchain_root = "$arm_android_toolchain_root" |
116 android_libgcc_file = "$android_toolchain_root/lib/gcc/arm-linux-androideabi
/${_android_toolchain_version}/libgcc.a" | 126 android_libgcc_file = "$android_toolchain_root/lib/gcc/arm-linux-androideabi
/${_android_toolchain_version}/libgcc.a" |
117 } else if (cpu_arch == "mipsel") { | 127 } else if (cpu_arch == "mipsel") { |
118 android_prebuilt_arch = "android-mips" | 128 android_prebuilt_arch = "android-mips" |
119 _binary_prefix = "mipsel-linux-android" | 129 _binary_prefix = "mipsel-linux-android" |
120 android_toolchain_root = "$mips_android_toolchain_root" | 130 android_toolchain_root = "$mips_android_toolchain_root" |
121 android_libgcc_file = "$android_toolchain_root/lib/gcc/mipsel-linux-android/
${_android_toolchain_version}/libgcc.a" | 131 android_libgcc_file = "$android_toolchain_root/lib/gcc/mipsel-linux-android/
${_android_toolchain_version}/libgcc.a" |
| 132 } else if (cpu_arch == "x64") { |
| 133 android_prebuilt_arch = "android-x86_64" |
| 134 _binary_prefix = "x86_64-linux-android" |
| 135 android_toolchain_root = "$x86_64_android_toolchain_root" |
| 136 android_libgcc_file = "$android_toolchain_root/lib/gcc/x86_64-linux-android/
${_android_toolchain_version}/libgcc.a" |
| 137 } else if (cpu_arch == "arm64") { |
| 138 android_prebuilt_arch = "android-arm64" |
| 139 _binary_prefix = "aarch64-linux-android" |
| 140 android_toolchain_root = "$arm64_android_toolchain_root" |
| 141 android_libgcc_file = "$android_toolchain_root/lib/gcc/aarch64-linux-android
/${_android_toolchain_version}/libgcc.a" |
| 142 } else if (cpu_arch == "mips64el") { |
| 143 android_prebuilt_arch = "android-mips64" |
| 144 _binary_prefix = "mips64el-linux-android" |
| 145 android_toolchain_root = "$mips64_android_toolchain_root" |
| 146 android_libgcc_file = "$android_toolchain_root/lib/gcc/mips64el-linux-androi
d/${_android_toolchain_version}/libgcc.a" |
122 } else { | 147 } else { |
123 assert(false, "Need android libgcc support for your target arch.") | 148 assert(false, "Need android libgcc support for your target arch.") |
124 } | 149 } |
125 | 150 |
126 android_tool_prefix = "$android_toolchain_root/bin/$_binary_prefix-" | 151 android_tool_prefix = "$android_toolchain_root/bin/$_binary_prefix-" |
127 android_readelf = "${android_tool_prefix}readelf" | 152 android_readelf = "${android_tool_prefix}readelf" |
128 android_objcopy = "${android_tool_prefix}objcopy" | 153 android_objcopy = "${android_tool_prefix}objcopy" |
129 android_gdbserver = | 154 android_gdbserver = |
130 "$android_ndk_root/prebuilt/$android_prebuilt_arch/gdbserver/gdbserver" | 155 "$android_ndk_root/prebuilt/$android_prebuilt_arch/gdbserver/gdbserver" |
131 | 156 |
(...skipping 11 matching lines...) Expand all Loading... |
143 android_app_abi = "x86" | 168 android_app_abi = "x86" |
144 } else if (cpu_arch == "arm") { | 169 } else if (cpu_arch == "arm") { |
145 import("//build/config/arm.gni") | 170 import("//build/config/arm.gni") |
146 if (arm_version < 7) { | 171 if (arm_version < 7) { |
147 android_app_abi = "armeabi" | 172 android_app_abi = "armeabi" |
148 } else { | 173 } else { |
149 android_app_abi = "armeabi-v7a" | 174 android_app_abi = "armeabi-v7a" |
150 } | 175 } |
151 } else if (cpu_arch == "mipsel") { | 176 } else if (cpu_arch == "mipsel") { |
152 android_app_abi = "mips" | 177 android_app_abi = "mips" |
| 178 } else if (cpu_arch == "x64") { |
| 179 android_app_abi = "x86_64" |
| 180 } else if (cpu_arch == "arm64") { |
| 181 android_app_abi = "arm64-v8a" |
| 182 } else if (cpu_arch == "mips64el") { |
| 183 android_app_abi = "mips64" |
153 } else { | 184 } else { |
154 assert(false, "Unknown Android ABI: " + cpu_arch) | 185 assert(false, "Unknown Android ABI: " + cpu_arch) |
155 } | 186 } |
156 } else { | 187 } else { |
157 if (!defined(is_android_webview_build)) { | 188 if (!defined(is_android_webview_build)) { |
158 is_android_webview_build = false | 189 is_android_webview_build = false |
159 } | 190 } |
160 } | 191 } |
OLD | NEW |