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 asmflags = cflags | |
brettw
2015/09/28 19:44:52
A comment here might be helpful for future generat
Bons
2015/09/28 20:15:39
Done.
| |
118 } | 120 } |
119 | 121 |
120 # This is included by reference in the //build/config/compiler:runtime_library | 122 # This is included by reference in the //build/config/compiler:runtime_library |
121 # config that is applied to all targets. It is here to separate out the logic | 123 # config that is applied to all targets. It is here to separate out the logic |
122 # that is Android-only. Please see that target for advice on what should go in | 124 # that is Android-only. Please see that target for advice on what should go in |
123 # :runtime_library vs. :compiler. | 125 # :runtime_library vs. :compiler. |
124 config("runtime_library") { | 126 config("runtime_library") { |
125 # NOTE: The libc++ header include paths below are specified in cflags | 127 # NOTE: The libc++ header include paths below are specified in cflags |
126 # rather than include_dirs because they need to come after include_dirs. | 128 # rather than include_dirs because they need to come after include_dirs. |
127 # Think of them like system headers, but don't use '-isystem' because the | 129 # 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... | |
187 | 189 |
188 # Clang with libc++ does not require an explicit atomic library reference. | 190 # Clang with libc++ does not require an explicit atomic library reference. |
189 if (!is_clang) { | 191 if (!is_clang) { |
190 libs += [ "atomic" ] | 192 libs += [ "atomic" ] |
191 } | 193 } |
192 } | 194 } |
193 | 195 |
194 config("sdk") { | 196 config("sdk") { |
195 if (sysroot != "") { | 197 if (sysroot != "") { |
196 cflags = [ "--sysroot=" + sysroot ] | 198 cflags = [ "--sysroot=" + sysroot ] |
199 asmflags = [ "--sysroot=" + sysroot ] | |
197 ldflags = [ "--sysroot=" + sysroot ] | 200 ldflags = [ "--sysroot=" + sysroot ] |
198 | 201 |
199 # Need to get some linker flags out of the sysroot. | 202 # Need to get some linker flags out of the sysroot. |
200 sysroot_ld_path = rebase_path("//build/config/linux/sysroot_ld_path.py") | 203 sysroot_ld_path = rebase_path("//build/config/linux/sysroot_ld_path.py") |
201 ldflags += [ exec_script(sysroot_ld_path, | 204 ldflags += [ exec_script(sysroot_ld_path, |
202 [ | 205 [ |
203 rebase_path("//build/linux/sysroot_ld_path.sh"), | 206 rebase_path("//build/linux/sysroot_ld_path.sh"), |
204 sysroot, | 207 sysroot, |
205 ], | 208 ], |
206 "value") ] | 209 "value") ] |
207 } | 210 } |
208 } | 211 } |
209 | 212 |
210 config("executable_config") { | 213 config("executable_config") { |
211 cflags = [ "-fPIE" ] | 214 cflags = [ "-fPIE" ] |
215 asmflags = [ "-fPIE" ] | |
212 ldflags = [ "-pie" ] | 216 ldflags = [ "-pie" ] |
213 } | 217 } |
214 | 218 |
215 config("hide_native_jni_exports") { | 219 config("hide_native_jni_exports") { |
216 ldflags = [ "-Wl,--version-script=" + | 220 ldflags = [ "-Wl,--version-script=" + |
217 rebase_path("//build/android/android_no_jni_exports.lst") ] | 221 rebase_path("//build/android/android_no_jni_exports.lst") ] |
218 } | 222 } |
OLD | NEW |