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 } | |
123 } | 112 } |
124 | 113 |
125 if (is_clang && !is_win) { | 114 if (is_clang && !is_win) { |
126 # This is here so that all files get recompiled after a clang roll and | 115 # This is here so that all files get recompiled after a clang roll and |
127 # when turning clang on or off. (defines are passed via the command line, | 116 # when turning clang on or off. (defines are passed via the command line, |
128 # and build system rebuild things when their commandline changes). Nothing | 117 # and build system rebuild things when their commandline changes). Nothing |
129 # should ever read this define. | 118 # should ever read this define. |
130 defines += [ | 119 defines += [ |
131 "CR_CLANG_REVISION=" + | 120 "CR_CLANG_REVISION=" + |
132 exec_script( | 121 exec_script( |
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
934 cflags += [ "-gsplit-dwarf" ] | 923 cflags += [ "-gsplit-dwarf" ] |
935 } | 924 } |
936 } | 925 } |
937 } | 926 } |
938 | 927 |
939 config("no_symbols") { | 928 config("no_symbols") { |
940 if (!is_win) { | 929 if (!is_win) { |
941 cflags = [ "-g0" ] | 930 cflags = [ "-g0" ] |
942 } | 931 } |
943 } | 932 } |
OLD | NEW |