| 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 defines += [ "_GLIBCXX_DEBUG=1" ] | 298 defines += [ "_GLIBCXX_DEBUG=1" ] |
| 281 } | 299 } |
| 282 } | 300 } |
| 283 | 301 |
| 284 config("release") { | 302 config("release") { |
| 285 defines = [ "NDEBUG" ] | 303 defines = [ "NDEBUG" ] |
| 286 | 304 |
| 287 # Sanitizers. | 305 # Sanitizers. |
| 288 # TODO(GYP) The GYP build has "release_valgrind_build == 0" for this | 306 # TODO(GYP) The GYP build has "release_valgrind_build == 0" for this |
| 289 # condition. When Valgrind is set up, we need to do the same here. | 307 # condition. When Valgrind is set up, we need to do the same here. |
| 290 if (!is_tsan) { | 308 if (is_tsan) { |
| 309 defines += [ |
| 310 "DYNAMIC_ANNOTATIONS_ENABLED=1", |
| 311 "WTF_USE_DYNAMIC_ANNOTATIONS=1", |
| 312 ] |
| 313 } else { |
| 291 defines += [ "NVALGRIND" ] | 314 defines += [ "NVALGRIND" ] |
| 292 if (!is_nacl) { | 315 if (!is_nacl) { |
| 293 # NaCl always enables dynamic annotations. Currently this value is set to | 316 # NaCl always enables dynamic annotations. Currently this value is set to |
| 294 # 1 for all .nexes. | 317 # 1 for all .nexes. |
| 295 defines += [ "DYNAMIC_ANNOTATIONS_ENABLED=0" ] | 318 defines += [ "DYNAMIC_ANNOTATIONS_ENABLED=0" ] |
| 296 } | 319 } |
| 297 } | 320 } |
| 298 } | 321 } |
| 299 | 322 |
| 300 # Default libraries ------------------------------------------------------------ | 323 # Default libraries ------------------------------------------------------------ |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 "CoreFoundation.framework", | 386 "CoreFoundation.framework", |
| 364 "CoreGraphics.framework", | 387 "CoreGraphics.framework", |
| 365 "CoreText.framework", | 388 "CoreText.framework", |
| 366 "Foundation.framework", | 389 "Foundation.framework", |
| 367 "UIKit.framework", | 390 "UIKit.framework", |
| 368 ] | 391 ] |
| 369 } else if (is_linux) { | 392 } else if (is_linux) { |
| 370 libs = [ "dl" ] | 393 libs = [ "dl" ] |
| 371 } | 394 } |
| 372 } | 395 } |
| OLD | NEW |