5
5
# This file contains common system config stuff for the Android build.
6
6
7
7
if (is_android ) {
8
- has_chrome_android_internal =
9
- exec_script (" //build/dir_exists.py" ,
10
- [ rebase_path (" //clank" , root_build_dir ) ],
11
- " string" ) == " True"
12
-
13
- if (has_chrome_android_internal ) {
14
- import (" //clank/config.gni" )
15
- }
16
-
17
8
if (! defined (default_android_sdk_root )) {
18
9
default_android_sdk_root = " //third_party/android_tools/sdk"
19
10
default_android_sdk_version = " 34"
@@ -25,22 +16,6 @@ if (is_android) {
25
16
android_sdk_version = default_android_sdk_version
26
17
android_sdk_build_tools_version = default_android_sdk_build_tools_version
27
18
28
- android_default_keystore_path =
29
- " //build/android/ant/chromium-debug.keystore"
30
- android_default_keystore_name = " chromiumdebugkey"
31
- android_default_keystore_password = " chromium"
32
-
33
- # This is a unique identifier for a given build. It's used for
34
- # identifying various build artifacts corresponding to a particular build of
35
- # chrome (e.g. where to find archived symbols).
36
- android_chrome_build_id = " \"\" "
37
-
38
- # Set to true to run findbugs on JAR targets.
39
- run_findbugs = false
40
-
41
- # Set to true to enable the Errorprone compiler
42
- use_errorprone_java_compiler = false
43
-
44
19
# Unused. Required for GN files maintained in other buildroots.
45
20
enable_java_templates = false
46
21
@@ -92,69 +67,17 @@ if (is_android) {
92
67
93
68
zipalign_path = " $android_sdk_build_tools /zipalign"
94
69
95
- # Subdirectories inside android_ndk_root that contain the sysroot for the
96
- # associated platform.
97
70
if (current_cpu != " x64" && current_cpu != " arm64" ) {
98
- android_api_level = 19
71
+ android_api_level = 21
99
72
}
100
73
101
74
# Toolchain root directory for each build. The actual binaries are inside
102
75
# a "bin" directory inside of these.
103
- _android_toolchain_version = " 4.9"
104
-
105
76
llvm_android_toolchain_root = " $android_ndk_root /toolchains/llvm/prebuilt/${ android_host_os } -${ android_host_arch } "
106
-
107
- x86_android_toolchain_root = " $android_ndk_root /toolchains/x86-${ _android_toolchain_version } /prebuilt/${ android_host_os } -${ android_host_arch } "
108
- arm_android_toolchain_root = " $android_ndk_root /toolchains/arm-linux-androideabi-${ _android_toolchain_version } /prebuilt/${ android_host_os } -${ android_host_arch } "
109
- x86_64_android_toolchain_root = " $android_ndk_root /toolchains/x86_64-${ _android_toolchain_version } /prebuilt/${ android_host_os } -${ android_host_arch } "
110
- arm64_android_toolchain_root = " $android_ndk_root /toolchains/aarch64-linux-android-${ _android_toolchain_version } /prebuilt/${ android_host_os } -${ android_host_arch } "
111
-
112
- x86_android_lib = " $llvm_android_toolchain_root /sysroot/usr/lib/i686-linux-android/${ android_api_level } "
113
- arm_android_lib = " $llvm_android_toolchain_root /sysroot/usr/lib/arm-linux-androideabi/${ android_api_level } "
114
- x86_64_android_lib = " $llvm_android_toolchain_root /sysroot/usr/lib/x86_64-linux-android/${ android_api_level } "
115
- arm64_android_lib = " $llvm_android_toolchain_root /sysroot/usr/lib/aarch64-linux-android/${ android_api_level } "
116
-
117
- # Location of libgcc. This is only needed for the current GN toolchain, so we
118
- # only need to define the current one, rather than one for every platform
119
- # like the toolchain roots.
120
- if (current_cpu == " x86" ) {
121
- android_prebuilt_arch = " android-x86"
122
- android_target_triple = " i686-linux-android"
123
- android_toolchain_root = " $x86_android_toolchain_root "
124
- android_lib = " $x86_android_lib "
125
- } else if (current_cpu == " arm" ) {
126
- android_prebuilt_arch = " android-arm"
127
- android_target_triple = " arm-linux-androideabi"
128
- android_toolchain_root = " $arm_android_toolchain_root "
129
- android_lib = " $arm_android_lib "
130
- } else if (current_cpu == " x64" ) {
131
- android_prebuilt_arch = " android-x86_64"
132
- android_target_triple = " x86_64-linux-android"
133
- android_toolchain_root = " $x86_64_android_toolchain_root "
134
- android_lib = " $x86_64_android_lib "
135
- } else if (current_cpu == " arm64" ) {
136
- android_prebuilt_arch = " android-arm64"
137
- android_target_triple = " aarch64-linux-android"
138
- android_toolchain_root = " $arm64_android_toolchain_root "
139
- android_lib = " $arm64_android_lib "
140
- } else {
141
- assert (false , " Need android libgcc support for your target arch." )
142
- }
143
-
144
- android_tool_prefix = " $android_toolchain_root /bin/$android_target_triple -"
145
- android_readelf = " ${ android_tool_prefix } readelf"
146
- android_objcopy = " ${ android_tool_prefix } objcopy"
147
- android_gdbserver =
148
- " $android_ndk_root /prebuilt/$android_prebuilt_arch /gdbserver/gdbserver"
77
+ android_toolchain_root = " $android_ndk_root /toolchains/llvm/prebuilt/${ android_host_os } -${ android_host_arch } "
149
78
150
79
# Toolchain stuff ------------------------------------------------------------
151
-
152
- android_libcpp_root = " $android_ndk_root /sources/cxx-stl/llvm-libc++"
153
- if (component_mode == " shared_library" ) {
154
- android_libcpp_library = " c++_shared"
155
- } else {
156
- android_libcpp_library = " c++_static"
157
- }
80
+ _android_lib_prefix = " $android_toolchain_root /sysroot/usr/lib"
158
81
159
82
if (component_mode == " shared_library" ) {
160
83
# By appending .cr, we prevent name collisions with libraries already
@@ -168,20 +91,21 @@ if (is_android) {
168
91
169
92
if (current_cpu == " x86" ) {
170
93
android_app_abi = " x86"
94
+ _android_lib_dir = " i686-linux-android"
171
95
} else if (current_cpu == " arm" ) {
172
- import (" //build/config/arm.gni" )
173
- if (arm_version < 7 ) {
174
- android_app_abi = " armeabi"
175
- } else {
176
- android_app_abi = " armeabi-v7a"
177
- }
96
+ android_app_abi = " armeabi-v7a"
97
+ _android_lib_dir = " arm-linux-androideabi"
178
98
} else if (current_cpu == " x64" ) {
179
99
android_app_abi = " x86_64"
100
+ _android_lib_dir = " x86_64-linux-android"
180
101
} else if (current_cpu == " arm64" ) {
181
102
android_app_abi = " arm64-v8a"
103
+ _android_lib_dir = " aarch64-linux-android"
182
104
} else {
183
105
assert (false , " Unknown Android ABI: " + current_cpu )
184
106
}
185
107
108
+ android_lib = " $_android_lib_prefix /$_android_lib_dir /$android_api_level "
109
+
186
110
android_log_tag = " \" flutter\" "
187
111
}
0 commit comments