Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(716)

Side by Side Diff: build/config/compiler/BUILD.gn

Issue 1284093002: GN: Don't explicitly define __ANDROID__ now that clang defines it automatically (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-clang1
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698