OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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/sysroot.gni") | 6 import("//build/config/sysroot.gni") |
7 | 7 |
8 # compiler --------------------------------------------------------------------- | 8 # compiler --------------------------------------------------------------------- |
9 # | 9 # |
10 # Base compiler configuration. | 10 # Base compiler configuration. |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 # Don't export symbols from statically linked libraries. | 204 # Don't export symbols from statically linked libraries. |
205 "-Wl,--exclude-libs=ALL", | 205 "-Wl,--exclude-libs=ALL", |
206 ] | 206 ] |
207 if (cpu_arch == "arm") { | 207 if (cpu_arch == "arm") { |
208 ldflags += [ | 208 ldflags += [ |
209 # Enable identical code folding to reduce size. | 209 # Enable identical code folding to reduce size. |
210 "-Wl,--icf=safe", | 210 "-Wl,--icf=safe", |
211 ] | 211 ] |
212 } | 212 } |
213 | 213 |
214 if (cpu_arch == "arm") { | 214 if (is_clang) { |
215 cflags += [ | 215 if (cpu_arch == "arm") { |
216 "-target arm-linux-androideabi", | 216 cflags += [ |
217 "-mllvm -arm-enable-ehabi", | 217 "-target arm-linux-androideabi", |
218 ] | 218 "-mllvm -arm-enable-ehabi", |
219 ldflags += [ "-target arm-linux-androideabi" ] | 219 ] |
220 } else if (cpu_arch == "x86") { | 220 ldflags += [ "-target arm-linux-androideabi" ] |
221 cflags += [ "-target x86-linux-androideabi" ] | 221 } else if (cpu_arch == "x86") { |
222 ldflags += [ "-target x86-linux-androideabi" ] | 222 cflags += [ "-target x86-linux-androideabi" ] |
| 223 ldflags += [ "-target x86-linux-androideabi" ] |
| 224 } |
223 } | 225 } |
224 } | 226 } |
225 } | 227 } |
226 | 228 |
227 # runtime_library ------------------------------------------------------------- | 229 # runtime_library ------------------------------------------------------------- |
228 # | 230 # |
229 # Sets the runtime library and associated options. | 231 # Sets the runtime library and associated options. |
230 # | 232 # |
231 # How do you determine what should go in here vs. "compiler" above? Consider if | 233 # How do you determine what should go in here vs. "compiler" above? Consider if |
232 # a target might choose to use a different runtime library (ignore for a moment | 234 # a target might choose to use a different runtime library (ignore for a moment |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 } else { | 593 } else { |
592 cflags = [ "-g1" ] | 594 cflags = [ "-g1" ] |
593 } | 595 } |
594 } | 596 } |
595 | 597 |
596 config("no_symbols") { | 598 config("no_symbols") { |
597 if (!is_win) { | 599 if (!is_win) { |
598 cflags = [ "-g0" ] | 600 cflags = [ "-g0" ] |
599 } | 601 } |
600 } | 602 } |
OLD | NEW |