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/allocator.gni") | 5 import("//build/config/allocator.gni") |
6 import("//build/config/chrome_build.gni") | 6 import("//build/config/chrome_build.gni") |
7 import("//build/config/crypto.gni") | 7 import("//build/config/crypto.gni") |
8 import("//build/config/features.gni") | 8 import("//build/config/features.gni") |
9 import("//build/config/ui.gni") | 9 import("//build/config/ui.gni") |
10 import("//build/module_args/v8.gni") | 10 import("//build/module_args/v8.gni") |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 } | 129 } |
130 if (use_ozone) { | 130 if (use_ozone) { |
131 defines += [ "USE_OZONE=1" ] | 131 defines += [ "USE_OZONE=1" ] |
132 } | 132 } |
133 if (use_x11) { | 133 if (use_x11) { |
134 defines += [ "USE_X11=1" ] | 134 defines += [ "USE_X11=1" ] |
135 } | 135 } |
136 if (use_allocator != "tcmalloc") { | 136 if (use_allocator != "tcmalloc") { |
137 defines += [ "NO_TCMALLOC" ] | 137 defines += [ "NO_TCMALLOC" ] |
138 } | 138 } |
139 if (is_asan) { | 139 if (is_asan || is_lsan || is_tsan || is_msan) { |
140 defines += [ | 140 defines += [ |
141 "ADDRESS_SANITIZER", | |
142 "MEMORY_TOOL_REPLACES_ALLOCATOR", | 141 "MEMORY_TOOL_REPLACES_ALLOCATOR", |
143 "MEMORY_SANITIZER_INITIAL_SIZE", | 142 "MEMORY_SANITIZER_INITIAL_SIZE", |
144 ] | 143 ] |
145 } | 144 } |
| 145 if (is_asan) { |
| 146 defines += [ "ADDRESS_SANITIZER" ] |
| 147 } |
| 148 if (is_lsan) { |
| 149 defines += [ |
| 150 "LEAK_SANITIZER", |
| 151 "WTF_USE_LEAK_SANITIZER=1", |
| 152 ] |
| 153 } |
| 154 if (is_tsan) { |
| 155 defines += [ |
| 156 "THREAD_SANITIZER", |
| 157 "DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1", |
| 158 "WTF_USE_DYNAMIC_ANNOTATIONS_NOIMPL=1", |
| 159 ] |
| 160 } |
| 161 if (is_msan) { |
| 162 defines += [ "MEMORY_SANITIZER" ] |
| 163 } |
146 if (enable_webrtc) { | 164 if (enable_webrtc) { |
147 defines += [ "ENABLE_WEBRTC=1" ] | 165 defines += [ "ENABLE_WEBRTC=1" ] |
148 } | 166 } |
149 if (disable_ftp_support) { | 167 if (disable_ftp_support) { |
150 defines += [ "DISABLE_FTP_SUPPORT=1" ] | 168 defines += [ "DISABLE_FTP_SUPPORT=1" ] |
151 } | 169 } |
152 if (!enable_nacl) { | 170 if (!enable_nacl) { |
153 defines += [ "DISABLE_NACL" ] | 171 defines += [ "DISABLE_NACL" ] |
154 } | 172 } |
155 if (enable_extensions) { | 173 if (enable_extensions) { |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 } | 220 } |
203 if (enable_google_now) { | 221 if (enable_google_now) { |
204 defines += [ "ENABLE_GOOGLE_NOW=1" ] | 222 defines += [ "ENABLE_GOOGLE_NOW=1" ] |
205 } | 223 } |
206 if (enable_one_click_signin) { | 224 if (enable_one_click_signin) { |
207 defines += [ "ENABLE_ONE_CLICK_SIGNIN" ] | 225 defines += [ "ENABLE_ONE_CLICK_SIGNIN" ] |
208 } | 226 } |
209 if (enable_hidpi) { | 227 if (enable_hidpi) { |
210 defines += [ "ENABLE_HIDPI=1" ] | 228 defines += [ "ENABLE_HIDPI=1" ] |
211 } | 229 } |
| 230 if (enable_topchrome_md) { |
| 231 defines += [ "ENABLE_TOPCHRME_MD=1" ] |
| 232 } |
212 if (proprietary_codecs) { | 233 if (proprietary_codecs) { |
213 defines += [ "USE_PROPRIETARY_CODECS" ] | 234 defines += [ "USE_PROPRIETARY_CODECS" ] |
214 } | 235 } |
215 if (enable_hangout_services_extension) { | 236 if (enable_hangout_services_extension) { |
216 defines += [ "ENABLE_HANGOUT_SERVICES_EXTENSION=1" ] | 237 defines += [ "ENABLE_HANGOUT_SERVICES_EXTENSION=1" ] |
217 } | 238 } |
218 if (v8_use_external_startup_data) { | 239 if (v8_use_external_startup_data) { |
219 defines += [ "V8_USE_EXTERNAL_STARTUP_DATA" ] | 240 defines += [ "V8_USE_EXTERNAL_STARTUP_DATA" ] |
220 } | 241 } |
221 if (enable_background) { | 242 if (enable_background) { |
(...skipping 19 matching lines...) Expand all Loading... |
241 defines += [ "SAFE_BROWSING_SERVICE" ] | 262 defines += [ "SAFE_BROWSING_SERVICE" ] |
242 } | 263 } |
243 if (is_official_build) { | 264 if (is_official_build) { |
244 defines += [ "OFFICIAL_BUILD" ] | 265 defines += [ "OFFICIAL_BUILD" ] |
245 } | 266 } |
246 if (is_chrome_branded) { | 267 if (is_chrome_branded) { |
247 defines += [ "GOOGLE_CHROME_BUILD" ] | 268 defines += [ "GOOGLE_CHROME_BUILD" ] |
248 } else { | 269 } else { |
249 defines += [ "CHROMIUM_BUILD" ] | 270 defines += [ "CHROMIUM_BUILD" ] |
250 } | 271 } |
| 272 if (enable_media_router) { |
| 273 defines += [ "ENABLE_MEDIA_ROUTER=1" ] |
| 274 } |
251 } | 275 } |
252 | 276 |
253 # Debug/release ---------------------------------------------------------------- | 277 # Debug/release ---------------------------------------------------------------- |
254 | 278 |
255 config("debug") { | 279 config("debug") { |
256 defines = [ | 280 defines = [ |
257 "_DEBUG", | 281 "_DEBUG", |
258 "DYNAMIC_ANNOTATIONS_ENABLED=1", | 282 "DYNAMIC_ANNOTATIONS_ENABLED=1", |
259 "WTF_USE_DYNAMIC_ANNOTATIONS=1", | 283 "WTF_USE_DYNAMIC_ANNOTATIONS=1", |
260 ] | 284 ] |
(...skipping 16 matching lines...) Expand all Loading... |
277 defines += [ "_GLIBCXX_DEBUG=1" ] | 301 defines += [ "_GLIBCXX_DEBUG=1" ] |
278 } | 302 } |
279 } | 303 } |
280 | 304 |
281 config("release") { | 305 config("release") { |
282 defines = [ "NDEBUG" ] | 306 defines = [ "NDEBUG" ] |
283 | 307 |
284 # Sanitizers. | 308 # Sanitizers. |
285 # TODO(GYP) The GYP build has "release_valgrind_build == 0" for this | 309 # TODO(GYP) The GYP build has "release_valgrind_build == 0" for this |
286 # condition. When Valgrind is set up, we need to do the same here. | 310 # condition. When Valgrind is set up, we need to do the same here. |
287 if (!is_tsan) { | 311 if (is_tsan) { |
| 312 defines += [ |
| 313 "DYNAMIC_ANNOTATIONS_ENABLED=1", |
| 314 "WTF_USE_DYNAMIC_ANNOTATIONS=1", |
| 315 ] |
| 316 } else { |
288 defines += [ "NVALGRIND" ] | 317 defines += [ "NVALGRIND" ] |
289 if (!is_nacl) { | 318 if (!is_nacl) { |
290 # NaCl always enables dynamic annotations. Currently this value is set to | 319 # NaCl always enables dynamic annotations. Currently this value is set to |
291 # 1 for all .nexes. | 320 # 1 for all .nexes. |
292 defines += [ "DYNAMIC_ANNOTATIONS_ENABLED=0" ] | 321 defines += [ "DYNAMIC_ANNOTATIONS_ENABLED=0" ] |
293 } | 322 } |
294 } | 323 } |
295 } | 324 } |
296 | 325 |
297 # Default libraries ------------------------------------------------------------ | 326 # Default libraries ------------------------------------------------------------ |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 "CoreFoundation.framework", | 389 "CoreFoundation.framework", |
361 "CoreGraphics.framework", | 390 "CoreGraphics.framework", |
362 "CoreText.framework", | 391 "CoreText.framework", |
363 "Foundation.framework", | 392 "Foundation.framework", |
364 "UIKit.framework", | 393 "UIKit.framework", |
365 ] | 394 ] |
366 } else if (is_linux) { | 395 } else if (is_linux) { |
367 libs = [ "dl" ] | 396 libs = [ "dl" ] |
368 } | 397 } |
369 } | 398 } |
OLD | NEW |