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

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

Issue 2717493002: Fix repeated "-Wunknown-pragmas -Wno-error=unknown-pragmas". (Closed)
Patch Set: Fix grammar errors. Created 3 years, 10 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 | tools/grit/grit_rule.gni » ('j') | 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 import("//build/config/compiler/compiler.gni") 7 import("//build/config/compiler/compiler.gni")
8 import("//build/config/nacl/config.gni") 8 import("//build/config/nacl/config.gni")
9 import("//build/toolchain/cc_wrapper.gni") 9 import("//build/toolchain/cc_wrapper.gni")
10 import("//build/toolchain/toolchain.gni") 10 import("//build/toolchain/toolchain.gni")
(...skipping 1673 matching lines...) Expand 10 before | Expand all | Expand 10 after
1684 } 1684 }
1685 1685
1686 # No symbols. 1686 # No symbols.
1687 config("no_symbols") { 1687 config("no_symbols") {
1688 if (!is_win) { 1688 if (!is_win) {
1689 cflags = [ "-g0" ] 1689 cflags = [ "-g0" ]
1690 asmflags = cflags 1690 asmflags = cflags
1691 } 1691 }
1692 } 1692 }
1693 1693
1694 # On Linux and Android, the "grit" template wants to disable the warning about
1695 # unknown pragmas. However since gn does not deduplicate the flags from configs
1696 # but only the config themselves, if the template declares a "config" for that
1697 # purpose, the flag will end up being repeated for each dependent "grit" target.
1698 # Using a separate config solves this problem.
1699 config("disable_unknown_pragma") {
1700 if (is_clang) {
1701 cflags = [
1702 "-Wunknown-pragmas",
1703 "-Wno-error=unknown-pragmas",
1704 ]
1705 }
1706 }
1707
1694 # Default symbols. 1708 # Default symbols.
1695 config("default_symbols") { 1709 config("default_symbols") {
1696 if (symbol_level == 0) { 1710 if (symbol_level == 0) {
1697 configs = [ ":no_symbols" ] 1711 configs = [ ":no_symbols" ]
1698 } else if (symbol_level == 1) { 1712 } else if (symbol_level == 1) {
1699 configs = [ ":minimal_symbols" ] 1713 configs = [ ":minimal_symbols" ]
1700 } else if (symbol_level == 2) { 1714 } else if (symbol_level == 2) {
1701 configs = [ ":symbols" ] 1715 configs = [ ":symbols" ]
1702 } else { 1716 } else {
1703 assert(false) 1717 assert(false)
1704 } 1718 }
1705 } 1719 }
1706 1720
1707 if (is_ios || is_mac) { 1721 if (is_ios || is_mac) {
1708 # On Mac and iOS, this enables support for ARC (automatic ref-counting). 1722 # On Mac and iOS, this enables support for ARC (automatic ref-counting).
1709 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. 1723 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
1710 config("enable_arc") { 1724 config("enable_arc") {
1711 common_flags = [ "-fobjc-arc" ] 1725 common_flags = [ "-fobjc-arc" ]
1712 cflags_objc = common_flags 1726 cflags_objc = common_flags
1713 cflags_objcc = common_flags 1727 cflags_objcc = common_flags
1714 } 1728 }
1715 } 1729 }
OLDNEW
« no previous file with comments | « no previous file | tools/grit/grit_rule.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698