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 if (cpu_arch == "arm") { | 6 if (cpu_arch == "arm") { |
7 import("//build/config/arm.gni") | 7 import("//build/config/arm.gni") |
8 } | 8 } |
9 if (is_posix) { | 9 if (is_posix) { |
10 import("//build/config/gcc/gcc_version.gni") | 10 import("//build/config/gcc/gcc_version.gni") |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 cflags += [ "-fstack-protector", "--param=ssp-buffer-size=4" ] | 98 cflags += [ "-fstack-protector", "--param=ssp-buffer-size=4" ] |
99 } | 99 } |
100 | 100 |
101 # Linker warnings. | 101 # Linker warnings. |
102 if (!(is_chromeos && cpu_arch == "arm") && !is_mac) { | 102 if (!(is_chromeos && cpu_arch == "arm") && !is_mac) { |
103 # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 | 103 # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 |
104 ldflags += [ "-Wl,--fatal-warnings" ] | 104 ldflags += [ "-Wl,--fatal-warnings" ] |
105 } | 105 } |
106 } | 106 } |
107 | 107 |
108 if (is_clang) { | 108 if (is_clang && is_debug) { |
109 cflags += [ | 109 # Allow comparing the address of references and 'this' against 0 |
110 # TODO(thakis): Remove once http://llvm.org/PR20354 is fixed | 110 # in debug builds. Technically, these can never be null in |
111 # and the fix is in chromium. | 111 # well-defined C/C++ and Clang can optimize such checks away in |
112 "-fno-slp-vectorize", | 112 # release builds, but they may be used in asserts in debug builds. |
| 113 cflags_cc += [ |
| 114 "-Wno-undefined-bool-conversion", |
| 115 "-Wno-tautological-undefined-compare", |
113 ] | 116 ] |
114 | |
115 if (is_debug) { | |
116 # Allow comparing the address of references and 'this' against 0 | |
117 # in debug builds. Technically, these can never be null in | |
118 # well-defined C/C++ and Clang can optimize such checks away in | |
119 # release builds, but they may be used in asserts in debug builds. | |
120 cflags_cc += [ | |
121 "-Wno-undefined-bool-conversion", | |
122 "-Wno-tautological-undefined-compare", | |
123 ] | |
124 } | |
125 } | 117 } |
126 | 118 |
127 if (is_clang && !is_win) { | 119 if (is_clang && !is_win) { |
128 # This is here so that all files get recompiled after a clang roll and | 120 # This is here so that all files get recompiled after a clang roll and |
129 # when turning clang on or off. (defines are passed via the command line, | 121 # when turning clang on or off. (defines are passed via the command line, |
130 # and build system rebuild things when their commandline changes). Nothing | 122 # and build system rebuild things when their commandline changes). Nothing |
131 # should ever read this define. | 123 # should ever read this define. |
132 defines += [ | 124 defines += [ |
133 "CR_CLANG_REVISION=" + | 125 "CR_CLANG_REVISION=" + |
134 exec_script( | 126 exec_script( |
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
942 cflags += [ "-gsplit-dwarf" ] | 934 cflags += [ "-gsplit-dwarf" ] |
943 } | 935 } |
944 } | 936 } |
945 } | 937 } |
946 | 938 |
947 config("no_symbols") { | 939 config("no_symbols") { |
948 if (!is_win) { | 940 if (!is_win) { |
949 cflags = [ "-g0" ] | 941 cflags = [ "-g0" ] |
950 } | 942 } |
951 } | 943 } |
OLD | NEW |