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 = exec_script("//build/dir_exists.py", |
9 [ rebase_path("//clank", root_build_dir) ], | 9 [ rebase_path("//clank", root_build_dir) ], |
10 "string") == "True" | 10 "string") == "True" |
(...skipping 19 matching lines...) Expand all Loading... |
30 android_default_keystore_path = "//build/android/ant/chromium-debug.keystore
" | 30 android_default_keystore_path = "//build/android/ant/chromium-debug.keystore
" |
31 android_default_keystore_name = "chromiumdebugkey" | 31 android_default_keystore_name = "chromiumdebugkey" |
32 android_default_keystore_password = "chromium" | 32 android_default_keystore_password = "chromium" |
33 | 33 |
34 # This is a unique identifier for a given build. It's used for | 34 # This is a unique identifier for a given build. It's used for |
35 # identifying various build artifacts corresponding to a particular build of | 35 # identifying various build artifacts corresponding to a particular build of |
36 # chrome (e.g. where to find archived symbols). | 36 # chrome (e.g. where to find archived symbols). |
37 android_chrome_build_id = "\"\"" | 37 android_chrome_build_id = "\"\"" |
38 } | 38 } |
39 | 39 |
| 40 # ABI ------------------------------------------------------------------------ |
| 41 |
| 42 if (cpu_arch == "x86") { |
| 43 android_app_abi = "x86" |
| 44 } else if (cpu_arch == "arm") { |
| 45 import("//build/config/arm.gni") |
| 46 if (arm_version < 7) { |
| 47 android_app_abi = "armeabi" |
| 48 } else { |
| 49 android_app_abi = "armeabi-v7a" |
| 50 } |
| 51 } else if (cpu_arch == "mipsel") { |
| 52 android_app_abi = "mips" |
| 53 } else { |
| 54 assert(false, "Unknown Android ABI: " + cpu_arch) |
| 55 } |
| 56 |
40 # Host stuff ----------------------------------------------------------------- | 57 # Host stuff ----------------------------------------------------------------- |
41 | 58 |
42 # Defines the name the Android build gives to the current host CPU | 59 # Defines the name the Android build gives to the current host CPU |
43 # architecture, which is different than the names GN uses. | 60 # architecture, which is different than the names GN uses. |
44 if (build_cpu_arch == "x64") { | 61 if (build_cpu_arch == "x64") { |
45 android_host_arch = "x86_64" | 62 android_host_arch = "x86_64" |
46 } else if (build_cpu_arch == "x86") { | 63 } else if (build_cpu_arch == "x86") { |
47 android_host_arch = "x86" | 64 android_host_arch = "x86" |
48 } else { | 65 } else { |
49 assert(false, "Need Android toolchain support for your build CPU arch.") | 66 assert(false, "Need Android toolchain support for your build CPU arch.") |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 if (cpu_arch == "x86") { | 116 if (cpu_arch == "x86") { |
100 android_prebuilt_arch = "android-x86" | 117 android_prebuilt_arch = "android-x86" |
101 _binary_prefix = "i686-linux-android" | 118 _binary_prefix = "i686-linux-android" |
102 android_toolchain_root = "$x86_android_toolchain_root" | 119 android_toolchain_root = "$x86_android_toolchain_root" |
103 android_libgcc_file = | 120 android_libgcc_file = |
104 "$android_toolchain_root/lib/gcc/i686-linux-android/${_android_toolchain_v
ersion}/libgcc.a" | 121 "$android_toolchain_root/lib/gcc/i686-linux-android/${_android_toolchain_v
ersion}/libgcc.a" |
105 } else if (cpu_arch == "arm") { | 122 } else if (cpu_arch == "arm") { |
106 android_prebuilt_arch = "android-arm" | 123 android_prebuilt_arch = "android-arm" |
107 _binary_prefix = "arm-linux-androideabi" | 124 _binary_prefix = "arm-linux-androideabi" |
108 android_toolchain_root = "$arm_android_toolchain_root" | 125 android_toolchain_root = "$arm_android_toolchain_root" |
109 android_libgcc_file = | 126 if (arm_use_thumb) { |
110 "$android_toolchain_root/lib/gcc/arm-linux-androideabi/${_android_toolchai
n_version}/libgcc.a" | 127 android_libgcc_file = |
| 128 "$android_toolchain_root/lib/gcc/arm-linux-androideabi/${_android_toolch
ain_version}/thumb/libgcc.a" |
| 129 } else { |
| 130 android_libgcc_file = |
| 131 "$android_toolchain_root/lib/gcc/arm-linux-androideabi/${_android_toolch
ain_version}/libgcc.a" |
| 132 } |
111 } else if (cpu_arch == "mipsel") { | 133 } else if (cpu_arch == "mipsel") { |
112 android_prebuilt_arch = "android-mips" | 134 android_prebuilt_arch = "android-mips" |
113 _binary_prefix = "mipsel-linux-android" | 135 _binary_prefix = "mipsel-linux-android" |
114 android_toolchain_root = "$mips_android_toolchain_root" | 136 android_toolchain_root = "$mips_android_toolchain_root" |
115 android_libgcc_file = | 137 android_libgcc_file = |
116 "$android_toolchain_root/lib/gcc/mipsel-linux-android/${_android_toolchain
_version}/libgcc.a" | 138 "$android_toolchain_root/lib/gcc/mipsel-linux-android/${_android_toolchain
_version}/libgcc.a" |
117 } else { | 139 } else { |
118 assert(false, "Need android libgcc support for your target arch.") | 140 assert(false, "Need android libgcc support for your target arch.") |
119 } | 141 } |
120 | 142 |
121 android_tool_prefix = "$android_toolchain_root/bin/$_binary_prefix-" | 143 android_tool_prefix = "$android_toolchain_root/bin/$_binary_prefix-" |
122 android_readelf = "${android_tool_prefix}readelf" | 144 android_readelf = "${android_tool_prefix}readelf" |
123 android_objcopy = "${android_tool_prefix}objcopy" | 145 android_objcopy = "${android_tool_prefix}objcopy" |
124 android_gdbserver = "$android_ndk_root/prebuilt/$android_prebuilt_arch/gdbserv
er/gdbserver" | 146 android_gdbserver = "$android_ndk_root/prebuilt/$android_prebuilt_arch/gdbserv
er/gdbserver" |
125 | 147 |
126 # stlport stuff -------------------------------------------------------------- | 148 # stlport stuff -------------------------------------------------------------- |
127 | 149 |
128 if (component_mode == "shared_library") { | 150 if (component_mode == "shared_library") { |
129 android_stlport_library = "stlport_shared" | 151 android_stlport_library = "stlport_shared" |
130 } else { | 152 } else { |
131 android_stlport_library = "stlport_static" | 153 android_stlport_library = "stlport_static" |
132 } | 154 } |
133 | |
134 # ABI ------------------------------------------------------------------------ | |
135 | |
136 if (cpu_arch == "x86") { | |
137 android_app_abi = "x86" | |
138 } else if (cpu_arch == "arm") { | |
139 import("//build/config/arm.gni") | |
140 if (arm_version < 7) { | |
141 android_app_abi = "armeabi" | |
142 } else { | |
143 android_app_abi = "armeabi-v7a" | |
144 } | |
145 } else if (cpu_arch == "mipsel") { | |
146 android_app_abi = "mips" | |
147 } else { | |
148 assert(false, "Unknown Android ABI: " + cpu_arch) | |
149 } | |
150 } else { | 155 } else { |
151 if (!defined(is_android_webview_build)) { | 156 if (!defined(is_android_webview_build)) { |
152 is_android_webview_build = false | 157 is_android_webview_build = false |
153 } | 158 } |
154 } | 159 } |
OLD | NEW |