| 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 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 | 7 |
| 8 assert(is_android) | 8 assert(is_android) |
| 9 | 9 |
| 10 # This is included by reference in the //build/config/compiler config that | 10 # This is included by reference in the //build/config/compiler config that |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 cflags_cc += [ | 116 cflags_cc += [ |
| 117 "-isystem" + libcxx_include_path, | 117 "-isystem" + libcxx_include_path, |
| 118 "-isystem" + libcxxabi_include_path, | 118 "-isystem" + libcxxabi_include_path, |
| 119 "-isystem" + | 119 "-isystem" + |
| 120 rebase_path("$android_ndk_root/sources/android/support/include", | 120 rebase_path("$android_ndk_root/sources/android/support/include", |
| 121 root_build_dir), | 121 root_build_dir), |
| 122 ] | 122 ] |
| 123 | 123 |
| 124 defines = [ "__GNU_SOURCE=1" ] # Necessary for clone(). | 124 defines = [ "__GNU_SOURCE=1" ] # Necessary for clone(). |
| 125 ldflags = [ "-nostdlib" ] | 125 ldflags = [ "-nostdlib" ] |
| 126 |
| 126 lib_dirs = [ android_libcpp_lib_dir ] | 127 lib_dirs = [ android_libcpp_lib_dir ] |
| 127 | 128 |
| 128 # The libc++ runtime library (must come first). | 129 libs = [ |
| 129 # ASan needs to dynamically link to libc++ even in static builds so | |
| 130 # that it can interpose operator new. | |
| 131 if (is_component_build || is_asan) { | |
| 132 libs = [ "c++_shared" ] | |
| 133 } else { | |
| 134 libs = [ "c++_static" ] | |
| 135 } | |
| 136 libs += [ | |
| 137 "c++abi", | 130 "c++abi", |
| 138 "android_support", | 131 "android_support", |
| 139 ] | 132 ] |
| 140 | 133 |
| 134 if (false) { |
| 135 # The libc++ runtime library (must come first). |
| 136 # ASan needs to dynamically link to libc++ even in static builds so |
| 137 # that it can interpose operator new. |
| 138 if (is_component_build || is_asan) { |
| 139 libs += [ "c++_shared" ] |
| 140 } else { |
| 141 libs += [ "c++_static" ] |
| 142 } |
| 143 } |
| 144 |
| 141 # arm builds of libc++ starting in NDK r12 depend on unwind. | 145 # arm builds of libc++ starting in NDK r12 depend on unwind. |
| 142 if (current_cpu == "arm") { | 146 if (current_cpu == "arm") { |
| 143 libs += [ "unwind" ] | 147 libs += [ "unwind" ] |
| 144 } | 148 } |
| 145 | 149 |
| 146 # Manually link the libgcc.a that the cross compiler uses. This is | 150 # Manually link the libgcc.a that the cross compiler uses. This is |
| 147 # absolute because the linker will look inside the sysroot if it's not. | 151 # absolute because the linker will look inside the sysroot if it's not. |
| 148 libs += [ | 152 libs += [ |
| 149 rebase_path(android_libgcc_file), | 153 rebase_path(android_libgcc_file), |
| 150 "c", | 154 "c", |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 | 233 |
| 230 # Avoid errors with current NDK: | 234 # Avoid errors with current NDK: |
| 231 # "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" | 235 # "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" |
| 232 "-finstrument-functions-exclude-file-list=arm_neon.h", | 236 "-finstrument-functions-exclude-file-list=arm_neon.h", |
| 233 ] | 237 ] |
| 234 } | 238 } |
| 235 } | 239 } |
| 236 | 240 |
| 237 config("no_cygprofile_instrumentation") { | 241 config("no_cygprofile_instrumentation") { |
| 238 } | 242 } |
| OLD | NEW |