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 declare_args() { | 8 declare_args() { |
9 # Absolute directory containing the Android source code. | 9 # Absolute directory containing the Android source code. |
10 android_src = "" | 10 android_src = "" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 # a "bin" directory inside of these. | 80 # a "bin" directory inside of these. |
81 _android_toolchain_version = "4.8" | 81 _android_toolchain_version = "4.8" |
82 x86_android_toolchain_root = "$android_ndk_root/toolchains/x86-${_android_tool
chain_version}/prebuilt/${android_host_os}-${android_host_arch}" | 82 x86_android_toolchain_root = "$android_ndk_root/toolchains/x86-${_android_tool
chain_version}/prebuilt/${android_host_os}-${android_host_arch}" |
83 arm_android_toolchain_root = "$android_ndk_root/toolchains/arm-linux-androidea
bi-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch
}" | 83 arm_android_toolchain_root = "$android_ndk_root/toolchains/arm-linux-androidea
bi-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch
}" |
84 mips_android_toolchain_root = "$android_ndk_root/toolchains/mipsel-linux-andro
id-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch
}" | 84 mips_android_toolchain_root = "$android_ndk_root/toolchains/mipsel-linux-andro
id-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch
}" |
85 | 85 |
86 # Location of libgcc. This is only needed for the current GN toolchain, so we | 86 # Location of libgcc. This is only needed for the current GN toolchain, so we |
87 # only need to define the current one, rather than one for every platform | 87 # only need to define the current one, rather than one for every platform |
88 # like the toolchain roots. | 88 # like the toolchain roots. |
89 if (cpu_arch == "x86") { | 89 if (cpu_arch == "x86") { |
| 90 android_prebuilt_arch = "android-x86" |
| 91 _binary_prefix = "i686-linux-android" |
90 android_toolchain_root = "$x86_android_toolchain_root" | 92 android_toolchain_root = "$x86_android_toolchain_root" |
91 android_libgcc_file = | 93 android_libgcc_file = |
92 "$android_toolchain_root/lib/gcc/i686-linux-android/${_android_toolchain_v
ersion}/libgcc.a" | 94 "$android_toolchain_root/lib/gcc/i686-linux-android/${_android_toolchain_v
ersion}/libgcc.a" |
93 } else if (cpu_arch == "arm") { | 95 } else if (cpu_arch == "arm") { |
| 96 android_prebuilt_arch = "android-arm" |
| 97 _binary_prefix = "arm-linux-androideabi" |
94 android_toolchain_root = "$arm_android_toolchain_root" | 98 android_toolchain_root = "$arm_android_toolchain_root" |
95 android_libgcc_file = | 99 android_libgcc_file = |
96 "$android_toolchain_root/lib/gcc/arm-linux-androideabi/${_android_toolchai
n_version}/libgcc.a" | 100 "$android_toolchain_root/lib/gcc/arm-linux-androideabi/${_android_toolchai
n_version}/libgcc.a" |
97 } else if (cpu_arch == "mipsel") { | 101 } else if (cpu_arch == "mipsel") { |
| 102 android_prebuilt_arch = "android-mips" |
| 103 _binary_prefix = "mipsel-linux-android" |
98 android_toolchain_root = "$mips_android_toolchain_root" | 104 android_toolchain_root = "$mips_android_toolchain_root" |
99 android_libgcc_file = | 105 android_libgcc_file = |
100 "$android_toolchain_root/lib/gcc/mipsel-linux-android/${_android_toolchain
_version}/libgcc.a" | 106 "$android_toolchain_root/lib/gcc/mipsel-linux-android/${_android_toolchain
_version}/libgcc.a" |
101 } else { | 107 } else { |
102 assert(false, "Need android libgcc support for your target arch.") | 108 assert(false, "Need android libgcc support for your target arch.") |
103 } | 109 } |
104 | 110 |
| 111 android_readelf = "$android_toolchain_root/bin/$_binary_prefix-readelf" |
| 112 android_gdbserver = "$android_ndk_root/prebuilt/$android_prebuilt_arch/gdbserv
er/gdbserver" |
| 113 |
105 # stlport stuff -------------------------------------------------------------- | 114 # stlport stuff -------------------------------------------------------------- |
106 | 115 |
107 use_system_stlport = is_android_webview_build | 116 use_system_stlport = is_android_webview_build |
108 | 117 |
109 if (use_system_stlport) { | 118 if (use_system_stlport) { |
110 android_stlport_library = "stlport" | 119 android_stlport_library = "stlport" |
111 } else if (component_mode == "shared_library") { | 120 } else if (component_mode == "shared_library") { |
112 android_stlport_library = "stlport_shared" | 121 android_stlport_library = "stlport_shared" |
113 } else { | 122 } else { |
114 android_stlport_library = "stlport_static" | 123 android_stlport_library = "stlport_static" |
(...skipping 14 matching lines...) Expand all Loading... |
129 android_app_abi = "mips" | 138 android_app_abi = "mips" |
130 } else { | 139 } else { |
131 assert(false, "Unknown Android ABI: " + cpu_arch) | 140 assert(false, "Unknown Android ABI: " + cpu_arch) |
132 } | 141 } |
133 } else { | 142 } else { |
134 if (!defined(is_android_webview_build)) { | 143 if (!defined(is_android_webview_build)) { |
135 is_android_webview_build = false | 144 is_android_webview_build = false |
136 } | 145 } |
137 use_system_stlport = false | 146 use_system_stlport = false |
138 } | 147 } |
OLD | NEW |