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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 ldflags += [ "-Wl,--fatal-warnings" ] | 102 ldflags += [ "-Wl,--fatal-warnings" ] |
103 } | 103 } |
104 } | 104 } |
105 | 105 |
106 if (is_clang) { | 106 if (is_clang) { |
107 cflags += [ | 107 cflags += [ |
108 # TODO(thakis): Remove once http://llvm.org/PR20354 is fixed | 108 # TODO(thakis): Remove once http://llvm.org/PR20354 is fixed |
109 # and the fix is in chromium. | 109 # and the fix is in chromium. |
110 "-fno-slp-vectorize", | 110 "-fno-slp-vectorize", |
111 ] | 111 ] |
| 112 |
| 113 if (is_debug) { |
| 114 # Allow comparing the address of references and 'this' against 0 |
| 115 # in debug builds. Technically, these can never be null in |
| 116 # well-defined C/C++ and Clang can optimize such checks away in |
| 117 # release builds, but they may be used in asserts in debug builds. |
| 118 cflags_cc += [ |
| 119 "-Wno-undefined-bool-conversion", |
| 120 "-Wno-tautological-undefined-compare", |
| 121 ] |
| 122 } |
112 } | 123 } |
113 | 124 |
114 if (is_clang && !is_win) { | 125 if (is_clang && !is_win) { |
115 # This is here so that all files get recompiled after a clang roll and | 126 # This is here so that all files get recompiled after a clang roll and |
116 # when turning clang on or off. (defines are passed via the command line, | 127 # when turning clang on or off. (defines are passed via the command line, |
117 # and build system rebuild things when their commandline changes). Nothing | 128 # and build system rebuild things when their commandline changes). Nothing |
118 # should ever read this define. | 129 # should ever read this define. |
119 defines += [ | 130 defines += [ |
120 "CR_CLANG_REVISION=" + | 131 "CR_CLANG_REVISION=" + |
121 exec_script( | 132 exec_script( |
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
923 cflags += [ "-gsplit-dwarf" ] | 934 cflags += [ "-gsplit-dwarf" ] |
924 } | 935 } |
925 } | 936 } |
926 } | 937 } |
927 | 938 |
928 config("no_symbols") { | 939 config("no_symbols") { |
929 if (!is_win) { | 940 if (!is_win) { |
930 cflags = [ "-g0" ] | 941 cflags = [ "-g0" ] |
931 } | 942 } |
932 } | 943 } |
OLD | NEW |