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

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

Issue 1469943002: GN(android): Fix up support for is_asan=true (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add include Created 5 years 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 | « no previous file | build/config/android/internal_rules.gni » ('j') | 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 24 matching lines...) Expand all
35 rebase_path(android_toolchain_root, root_build_dir) 35 rebase_path(android_toolchain_root, root_build_dir)
36 if (current_cpu == "arm") { 36 if (current_cpu == "arm") {
37 cflags += [ 37 cflags += [
38 # TODO(hans) Enable integrated-as (crbug.com/124610). 38 # TODO(hans) Enable integrated-as (crbug.com/124610).
39 "-no-integrated-as", 39 "-no-integrated-as",
40 "-B${rebased_android_toolchain_root}/bin", # Else /usr/bin/as gets pick ed up. 40 "-B${rebased_android_toolchain_root}/bin", # Else /usr/bin/as gets pick ed up.
41 ] 41 ]
42 } 42 }
43 } 43 }
44 44
45 if (is_asan) {
46 # Android build relies on -Wl,--gc-sections removing unreachable code.
47 # ASan instrumentation for globals inhibits this and results in a library
48 # with unresolvable relocations.
49 # TODO(eugenis): find a way to reenable this.
50 cflags += [ "-mllvm -asan-globals=0" ]
51 }
52
53 # Use gold for Android for most CPU architectures. 45 # Use gold for Android for most CPU architectures.
54 if (current_cpu == "x86" || current_cpu == "x64" || current_cpu == "arm") { 46 if (current_cpu == "x86" || current_cpu == "x64" || current_cpu == "arm") {
55 ldflags += [ "-fuse-ld=gold" ] 47 ldflags += [ "-fuse-ld=gold" ]
56 if (is_clang) { 48 if (is_clang) {
57 # Let clang find the ld.gold in the NDK. 49 # Let clang find the ld.gold in the NDK.
58 ldflags += [ "--gcc-toolchain=$rebased_android_toolchain_root" ] 50 ldflags += [ "--gcc-toolchain=$rebased_android_toolchain_root" ]
59 } 51 }
60 52
61 # Use -mstackrealign due to a bug on ia32 Jelly Bean. 53 # Use -mstackrealign due to a bug on ia32 Jelly Bean.
62 # See crbug.com/521527 54 # See crbug.com/521527
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 225
234 # Avoid errors with current NDK: 226 # Avoid errors with current NDK:
235 # "third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.6/prebui lt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/include/arm_neon.h:3426 :3: error: argument must be a constant" 227 # "third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.6/prebui lt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/include/arm_neon.h:3426 :3: error: argument must be a constant"
236 "-finstrument-functions-exclude-file-list=arm_neon.h,SaturatedArithmeticARM. h", 228 "-finstrument-functions-exclude-file-list=arm_neon.h,SaturatedArithmeticARM. h",
237 ] 229 ]
238 defines = [ "CYGPROFILE_INSTRUMENTATION=1" ] 230 defines = [ "CYGPROFILE_INSTRUMENTATION=1" ]
239 } 231 }
240 232
241 config("no_cygprofile_instrumentation") { 233 config("no_cygprofile_instrumentation") {
242 } 234 }
OLDNEW
« no previous file with comments | « no previous file | build/config/android/internal_rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698