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 import("//build/config/sysroot.gni") | 7 import("//build/config/sysroot.gni") |
8 | 8 |
9 assert(is_android) | 9 assert(is_android) |
10 | 10 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 } | 108 } |
109 cflags += [ | 109 cflags += [ |
110 "-target", | 110 "-target", |
111 abi_target, | 111 abi_target, |
112 ] | 112 ] |
113 ldflags += [ | 113 ldflags += [ |
114 "-target", | 114 "-target", |
115 abi_target, | 115 abi_target, |
116 ] | 116 ] |
117 } | 117 } |
118 | |
119 # Assign any flags set for the C compiler to asmflags so that they are sent | |
120 # to the assembler. | |
121 asmflags = cflags | |
122 } | 118 } |
123 | 119 |
124 # This is included by reference in the //build/config/compiler:runtime_library | 120 # This is included by reference in the //build/config/compiler:runtime_library |
125 # config that is applied to all targets. It is here to separate out the logic | 121 # config that is applied to all targets. It is here to separate out the logic |
126 # that is Android-only. Please see that target for advice on what should go in | 122 # that is Android-only. Please see that target for advice on what should go in |
127 # :runtime_library vs. :compiler. | 123 # :runtime_library vs. :compiler. |
128 config("runtime_library") { | 124 config("runtime_library") { |
129 # NOTE: The libc++ header include paths below are specified in cflags | 125 # NOTE: The libc++ header include paths below are specified in cflags |
130 # rather than include_dirs because they need to come after include_dirs. | 126 # rather than include_dirs because they need to come after include_dirs. |
131 # Think of them like system headers, but don't use '-isystem' because the | 127 # Think of them like system headers, but don't use '-isystem' because the |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 | 187 |
192 # Clang with libc++ does not require an explicit atomic library reference. | 188 # Clang with libc++ does not require an explicit atomic library reference. |
193 if (!is_clang) { | 189 if (!is_clang) { |
194 libs += [ "atomic" ] | 190 libs += [ "atomic" ] |
195 } | 191 } |
196 } | 192 } |
197 | 193 |
198 config("sdk") { | 194 config("sdk") { |
199 if (sysroot != "") { | 195 if (sysroot != "") { |
200 cflags = [ "--sysroot=" + sysroot ] | 196 cflags = [ "--sysroot=" + sysroot ] |
201 asmflags = [ "--sysroot=" + sysroot ] | |
202 ldflags = [ "--sysroot=" + sysroot ] | 197 ldflags = [ "--sysroot=" + sysroot ] |
203 | 198 |
204 # Need to get some linker flags out of the sysroot. | 199 # Need to get some linker flags out of the sysroot. |
205 sysroot_ld_path = rebase_path("//build/config/linux/sysroot_ld_path.py") | 200 sysroot_ld_path = rebase_path("//build/config/linux/sysroot_ld_path.py") |
206 ldflags += [ exec_script(sysroot_ld_path, | 201 ldflags += [ exec_script(sysroot_ld_path, |
207 [ | 202 [ |
208 rebase_path("//build/linux/sysroot_ld_path.sh"), | 203 rebase_path("//build/linux/sysroot_ld_path.sh"), |
209 sysroot, | 204 sysroot, |
210 ], | 205 ], |
211 "value") ] | 206 "value") ] |
212 } | 207 } |
213 } | 208 } |
214 | 209 |
215 config("executable_config") { | 210 config("executable_config") { |
216 cflags = [ "-fPIE" ] | 211 cflags = [ "-fPIE" ] |
217 asmflags = [ "-fPIE" ] | |
218 ldflags = [ "-pie" ] | 212 ldflags = [ "-pie" ] |
219 } | 213 } |
220 | 214 |
221 config("hide_native_jni_exports") { | 215 config("hide_native_jni_exports") { |
222 ldflags = [ "-Wl,--version-script=" + | 216 ldflags = [ "-Wl,--version-script=" + |
223 rebase_path("//build/android/android_no_jni_exports.lst") ] | 217 rebase_path("//build/android/android_no_jni_exports.lst") ] |
224 } | 218 } |
225 | 219 |
226 # Instrumentation ------------------------------------------------------------- | 220 # Instrumentation ------------------------------------------------------------- |
227 # | 221 # |
(...skipping 21 matching lines...) Expand all Loading... |
249 | 243 |
250 # Avoid errors with current NDK: | 244 # Avoid errors with current NDK: |
251 # "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" | 245 # "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" |
252 "-finstrument-functions-exclude-file-list=arm_neon.h,SaturatedArithmeticARM.
h", | 246 "-finstrument-functions-exclude-file-list=arm_neon.h,SaturatedArithmeticARM.
h", |
253 ] | 247 ] |
254 defines = [ "CYGPROFILE_INSTRUMENTATION=1" ] | 248 defines = [ "CYGPROFILE_INSTRUMENTATION=1" ] |
255 } | 249 } |
256 | 250 |
257 config("no_cygprofile_instrumentation") { | 251 config("no_cygprofile_instrumentation") { |
258 } | 252 } |
OLD | NEW |