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/chrome_build.gni") | 6 import("//build/config/chrome_build.gni") |
7 if (current_cpu == "arm") { | 7 if (current_cpu == "arm") { |
8 import("//build/config/arm.gni") | 8 import("//build/config/arm.gni") |
9 } | 9 } |
10 if (current_cpu == "mipsel" || current_cpu == "mips64el") { | 10 if (current_cpu == "mipsel" || current_cpu == "mips64el") { |
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 } | 552 } |
553 if (is_asan) { | 553 if (is_asan) { |
554 # Android build relies on -Wl,--gc-sections removing unreachable code. | 554 # Android build relies on -Wl,--gc-sections removing unreachable code. |
555 # ASan instrumentation for globals inhibits this and results in a library | 555 # ASan instrumentation for globals inhibits this and results in a library |
556 # with unresolvable relocations. | 556 # with unresolvable relocations. |
557 # TODO(eugenis): find a way to reenable this. | 557 # TODO(eugenis): find a way to reenable this. |
558 cflags += [ "-mllvm -asan-globals=0" ] | 558 cflags += [ "-mllvm -asan-globals=0" ] |
559 } | 559 } |
560 | 560 |
561 defines += [ "ANDROID" ] | 561 defines += [ "ANDROID" ] |
562 if (is_clang) { | |
563 # GCC provides this as a built-in macro, but clang does not. | |
564 defines += [ "__ANDROID__" ] | |
565 } | |
566 | 562 |
567 # The NDK has these things, but doesn't define the constants | 563 # The NDK has these things, but doesn't define the constants |
568 # to say that it does. Define them here instead. | 564 # to say that it does. Define them here instead. |
569 defines += [ "HAVE_SYS_UIO_H" ] | 565 defines += [ "HAVE_SYS_UIO_H" ] |
570 | 566 |
571 # Use gold for Android for most CPU architectures. | 567 # Use gold for Android for most CPU architectures. |
572 if (current_cpu == "x86" || current_cpu == "x64" || current_cpu == "arm") { | 568 if (current_cpu == "x86" || current_cpu == "x64" || current_cpu == "arm") { |
573 ldflags += [ "-fuse-ld=gold" ] | 569 ldflags += [ "-fuse-ld=gold" ] |
574 if (is_clang) { | 570 if (is_clang) { |
575 # Let clang find the ld.gold in the NDK. | 571 # Let clang find the ld.gold in the NDK. |
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1336 cflags += [ "-gsplit-dwarf" ] | 1332 cflags += [ "-gsplit-dwarf" ] |
1337 } | 1333 } |
1338 } | 1334 } |
1339 } | 1335 } |
1340 | 1336 |
1341 config("no_symbols") { | 1337 config("no_symbols") { |
1342 if (!is_win) { | 1338 if (!is_win) { |
1343 cflags = [ "-g0" ] | 1339 cflags = [ "-g0" ] |
1344 } | 1340 } |
1345 } | 1341 } |
OLD | NEW |