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

Side by Side Diff: build/config/android/BUILD.gn

Issue 1539353002: GN(android): Default libs logic from runtime_library -> default_libs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix try job failure due to lib order Created 4 years, 11 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
« no previous file with comments | « build/config/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 import("//build/config/android/config.gni") 5 import("//build/config/android/config.gni")
6 import("//build/config/sanitizers/sanitizers.gni") 6 import("//build/config/sanitizers/sanitizers.gni")
7 import("//build/config/sysroot.gni") 7 import("//build/config/sysroot.gni")
8 8
9 assert(is_android) 9 assert(is_android)
10 10
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 # The libc++ runtime library (must come first). 148 # The libc++ runtime library (must come first).
149 # ASan needs to dynamically link to libc++ even in static builds so 149 # ASan needs to dynamically link to libc++ even in static builds so
150 # that it can interpose operator new. 150 # that it can interpose operator new.
151 if (is_component_build || is_asan) { 151 if (is_component_build || is_asan) {
152 libs = [ "c++_shared" ] 152 libs = [ "c++_shared" ]
153 } else { 153 } else {
154 libs = [ "c++_static" ] 154 libs = [ "c++_static" ]
155 } 155 }
156 156
157 # libgcc must come before libdl for ld.bfd (MIPS) 157 # Manually link the libgcc.a that the cross compiler uses. This is
158 if (current_cpu == "mipsel") { 158 # absolute because the linker will look inside the sysroot if it's not.
159 libs += [ 159 libs += [
160 # ld linker is used for mips Android, and ld does not accept library 160 rebase_path(android_libgcc_file),
161 # absolute path prefixed by "-l"; Since libgcc does not exist in mips 161 "c",
162 # sysroot the proper library will be linked. 162 ]
163 # TODO(gordanac): Remove once gold linker is used for mips Android. 163
164 "gcc", 164 # Clang with libc++ does not require an explicit atomic library reference.
165 ] 165 if (!is_clang) {
166 } else { 166 libs += [ "atomic" ]
167 libs += [
168 # Manually link the libgcc.a that the cross compiler uses. This is
169 # absolute because the linker will look inside the sysroot if it's not.
170 rebase_path(android_libgcc_file),
171 ]
172 } 167 }
173 168
174 libs += [
175 "c",
176 "dl",
177 "m",
178 ]
179
180 if (is_clang) { 169 if (is_clang) {
181 # Work around incompatibilities between bionic and clang headers. 170 # Work around incompatibilities between bionic and clang headers.
182 defines += [ 171 defines += [
183 "__compiler_offsetof=__builtin_offsetof", 172 "__compiler_offsetof=__builtin_offsetof",
184 "nan=__builtin_nan", 173 "nan=__builtin_nan",
185 ] 174 ]
186 } 175 }
187 176
188 # TODO(jdduke) Re-enable on mips after resolving linking 177 # TODO(jdduke) Re-enable on mips after resolving linking
189 # issues with libc++ (crbug.com/456380). 178 # issues with libc++ (crbug.com/456380).
190 if (current_cpu != "mipsel" && current_cpu != "mips64el") { 179 if (current_cpu != "mipsel" && current_cpu != "mips64el") {
191 ldflags += [ "-Wl,--warn-shared-textrel" ] 180 ldflags += [ "-Wl,--warn-shared-textrel" ]
192 } 181 }
193
194 # Clang with libc++ does not require an explicit atomic library reference.
195 if (!is_clang) {
196 libs += [ "atomic" ]
197 }
198 } 182 }
199 183
200 config("executable_config") { 184 config("executable_config") {
201 cflags = [ "-fPIE" ] 185 cflags = [ "-fPIE" ]
202 asmflags = [ "-fPIE" ] 186 asmflags = [ "-fPIE" ]
203 ldflags = [ "-pie" ] 187 ldflags = [ "-pie" ]
204 } 188 }
205 189
206 config("hide_native_jni_exports") { 190 config("hide_native_jni_exports") {
207 ldflags = [ "-Wl,--version-script=" + 191 ldflags = [ "-Wl,--version-script=" +
(...skipping 28 matching lines...) Expand all
236 220
237 # Avoid errors with current NDK: 221 # Avoid errors with current NDK:
238 # "third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.6/preb uilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/include/arm_neon.h:34 26:3: error: argument must be a constant" 222 # "third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.6/preb uilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/include/arm_neon.h:34 26:3: error: argument must be a constant"
239 "-finstrument-functions-exclude-file-list=arm_neon.h", 223 "-finstrument-functions-exclude-file-list=arm_neon.h",
240 ] 224 ]
241 } 225 }
242 } 226 }
243 227
244 config("no_cygprofile_instrumentation") { 228 config("no_cygprofile_instrumentation") {
245 } 229 }
OLDNEW
« no previous file with comments | « build/config/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698