Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(624)

Side by Side Diff: build/config/android/config.gni

Issue 456493002: Add native libraries to gn apks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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_current_toolchain_root = x86_android_toolchain_root
91 android_prebuilt_arch = "android-x86"
92 binary_prefix = "i686-linux-android"
90 android_libgcc_file = 93 android_libgcc_file =
91 "$x86_android_toolchain_root/lib/gcc/i686-linux-android/${_android_toolcha in_version}/libgcc.a" 94 "$x86_android_toolchain_root/lib/gcc/i686-linux-android/${_android_toolcha in_version}/libgcc.a"
92 } else if (cpu_arch == "arm") { 95 } else if (cpu_arch == "arm") {
96 android_current_toolchain_root = arm_android_toolchain_root
97 android_prebuilt_arch = "android-arm"
98 binary_prefix = "arm-linux-androideabi"
93 android_libgcc_file = 99 android_libgcc_file =
94 "$arm_android_toolchain_root/lib/gcc/arm-linux-androideabi/${_android_tool chain_version}/libgcc.a" 100 "$arm_android_toolchain_root/lib/gcc/arm-linux-androideabi/${_android_tool chain_version}/libgcc.a"
95 } else if (cpu_arch == "mipsel") { 101 } else if (cpu_arch == "mipsel") {
102 android_current_toolchain_root = mips_android_toolchain_root
103 android_prebuilt_arch = "android-mips"
104 binary_prefix = "mipsel-linux-android"
96 android_libgcc_file = 105 android_libgcc_file =
97 "$mips_android_toolchain_root/lib/gcc/mipsel-linux-android/${_android_tool chain_version}/libgcc.a" 106 "$mips_android_toolchain_root/lib/gcc/mipsel-linux-android/${_android_tool chain_version}/libgcc.a"
98 } else { 107 } else {
99 assert(false, "Need android libgcc support for your target arch.") 108 assert(false, "Need android libgcc support for your target arch.")
100 } 109 }
101 110
111 android_readelf = "$android_current_toolchain_root/bin/$binary_prefix-readelf"
112 android_gdbserver = "$android_ndk_root/prebuilt/$android_prebuilt_arch/gdbserv er/gdbserver"
113
102 # stlport stuff -------------------------------------------------------------- 114 # stlport stuff --------------------------------------------------------------
103 115
104 use_system_stlport = is_android_webview_build 116 use_system_stlport = is_android_webview_build
105 117
106 if (use_system_stlport) { 118 if (use_system_stlport) {
107 android_stlport_library = "stlport" 119 android_stlport_library = "stlport"
108 } else if (component_mode == "shared_library") { 120 } else if (component_mode == "shared_library") {
109 android_stlport_library = "stlport_shared" 121 android_stlport_library = "stlport_shared"
110 } else { 122 } else {
111 android_stlport_library = "stlport_static" 123 android_stlport_library = "stlport_static"
(...skipping 14 matching lines...) Expand all
126 android_app_abi = "mips" 138 android_app_abi = "mips"
127 } else { 139 } else {
128 assert(false, "Unknown Android ABI: " + cpu_arch) 140 assert(false, "Unknown Android ABI: " + cpu_arch)
129 } 141 }
130 } else { 142 } else {
131 if (!defined(is_android_webview_build)) { 143 if (!defined(is_android_webview_build)) {
132 is_android_webview_build = false 144 is_android_webview_build = false
133 } 145 }
134 use_system_stlport = false 146 use_system_stlport = false
135 } 147 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698