| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 if (is_asan || is_lsan || is_tsan || is_msan) { | 78 if (is_asan || is_lsan || is_tsan || is_msan) { |
| 79 defines += [ | 79 defines += [ |
| 80 "MEMORY_TOOL_REPLACES_ALLOCATOR", | 80 "MEMORY_TOOL_REPLACES_ALLOCATOR", |
| 81 "MEMORY_SANITIZER_INITIAL_SIZE", | 81 "MEMORY_SANITIZER_INITIAL_SIZE", |
| 82 ] | 82 ] |
| 83 } | 83 } |
| 84 if (is_asan) { | 84 if (is_asan) { |
| 85 defines += [ "ADDRESS_SANITIZER" ] | 85 defines += [ "ADDRESS_SANITIZER" ] |
| 86 } | 86 } |
| 87 if (is_lsan) { | 87 if (is_lsan) { |
| 88 defines += [ | 88 defines += [ "LEAK_SANITIZER" ] |
| 89 "LEAK_SANITIZER", | |
| 90 "WTF_USE_LEAK_SANITIZER=1", | |
| 91 ] | |
| 92 } | 89 } |
| 93 if (is_tsan) { | 90 if (is_tsan) { |
| 94 defines += [ | 91 defines += [ |
| 95 "THREAD_SANITIZER", | 92 "THREAD_SANITIZER", |
| 96 "DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1", | 93 "DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1", |
| 97 "WTF_USE_DYNAMIC_ANNOTATIONS_NOIMPL=1", | |
| 98 ] | 94 ] |
| 99 } | 95 } |
| 100 if (is_msan) { | 96 if (is_msan) { |
| 101 defines += [ "MEMORY_SANITIZER" ] | 97 defines += [ "MEMORY_SANITIZER" ] |
| 102 } | 98 } |
| 103 if (!enable_nacl) { | 99 if (!enable_nacl) { |
| 104 defines += [ "DISABLE_NACL" ] | 100 defines += [ "DISABLE_NACL" ] |
| 105 } | 101 } |
| 106 if (v8_use_external_startup_data) { | 102 if (v8_use_external_startup_data) { |
| 107 defines += [ "V8_USE_EXTERNAL_STARTUP_DATA" ] | 103 defines += [ "V8_USE_EXTERNAL_STARTUP_DATA" ] |
| 108 } | 104 } |
| 109 if (is_official_build) { | 105 if (is_official_build) { |
| 110 defines += [ "OFFICIAL_BUILD" ] | 106 defines += [ "OFFICIAL_BUILD" ] |
| 111 } | 107 } |
| 112 if (is_chrome_branded) { | 108 if (is_chrome_branded) { |
| 113 defines += [ "GOOGLE_CHROME_BUILD" ] | 109 defines += [ "GOOGLE_CHROME_BUILD" ] |
| 114 } else { | 110 } else { |
| 115 defines += [ "CHROMIUM_BUILD" ] | 111 defines += [ "CHROMIUM_BUILD" ] |
| 116 } | 112 } |
| 117 } | 113 } |
| 118 | 114 |
| 119 # Debug/release ---------------------------------------------------------------- | 115 # Debug/release ---------------------------------------------------------------- |
| 120 | 116 |
| 121 config("debug") { | 117 config("debug") { |
| 122 defines = [ | 118 defines = [ |
| 123 "_DEBUG", | 119 "_DEBUG", |
| 124 "DYNAMIC_ANNOTATIONS_ENABLED=1", | 120 "DYNAMIC_ANNOTATIONS_ENABLED=1", |
| 125 "WTF_USE_DYNAMIC_ANNOTATIONS=1", | |
| 126 ] | 121 ] |
| 127 | 122 |
| 128 if (is_nacl) { | 123 if (is_nacl) { |
| 129 defines += [ "DYNAMIC_ANNOTATIONS_PREFIX=NACL_" ] | 124 defines += [ "DYNAMIC_ANNOTATIONS_PREFIX=NACL_" ] |
| 130 } | 125 } |
| 131 | 126 |
| 132 if (is_linux && !is_android && current_cpu == "x64" && | 127 if (is_linux && !is_android && current_cpu == "x64" && |
| 133 !disable_iterator_debugging) { | 128 !disable_iterator_debugging) { |
| 134 # Enable libstdc++ debugging facilities to help catch problems early, see | 129 # Enable libstdc++ debugging facilities to help catch problems early, see |
| 135 # http://crbug.com/65151 . | 130 # http://crbug.com/65151 . |
| 136 # TODO(phajdan.jr): Should we enable this for all of POSIX? | 131 # TODO(phajdan.jr): Should we enable this for all of POSIX? |
| 137 defines += [ "_GLIBCXX_DEBUG=1" ] | 132 defines += [ "_GLIBCXX_DEBUG=1" ] |
| 138 } | 133 } |
| 139 } | 134 } |
| 140 | 135 |
| 141 config("release") { | 136 config("release") { |
| 142 defines = [ "NDEBUG" ] | 137 defines = [ "NDEBUG" ] |
| 143 | 138 |
| 144 # Sanitizers. | 139 # Sanitizers. |
| 145 # TODO(GYP) The GYP build has "release_valgrind_build == 0" for this | 140 # TODO(GYP) The GYP build has "release_valgrind_build == 0" for this |
| 146 # condition. When Valgrind is set up, we need to do the same here. | 141 # condition. When Valgrind is set up, we need to do the same here. |
| 147 if (is_tsan) { | 142 if (is_tsan) { |
| 148 defines += [ | 143 defines += [ "DYNAMIC_ANNOTATIONS_ENABLED=1" ] |
| 149 "DYNAMIC_ANNOTATIONS_ENABLED=1", | |
| 150 "WTF_USE_DYNAMIC_ANNOTATIONS=1", | |
| 151 ] | |
| 152 } else { | 144 } else { |
| 153 defines += [ "NVALGRIND" ] | 145 defines += [ "NVALGRIND" ] |
| 154 if (!is_nacl) { | 146 if (!is_nacl) { |
| 155 # NaCl always enables dynamic annotations. Currently this value is set to | 147 # NaCl always enables dynamic annotations. Currently this value is set to |
| 156 # 1 for all .nexes. | 148 # 1 for all .nexes. |
| 157 defines += [ "DYNAMIC_ANNOTATIONS_ENABLED=0" ] | 149 defines += [ "DYNAMIC_ANNOTATIONS_ENABLED=0" ] |
| 158 } | 150 } |
| 159 } | 151 } |
| 160 } | 152 } |
| 161 | 153 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 191 "CoreFoundation.framework", | 183 "CoreFoundation.framework", |
| 192 "CoreGraphics.framework", | 184 "CoreGraphics.framework", |
| 193 "CoreText.framework", | 185 "CoreText.framework", |
| 194 "Foundation.framework", | 186 "Foundation.framework", |
| 195 "UIKit.framework", | 187 "UIKit.framework", |
| 196 ] | 188 ] |
| 197 } else if (is_linux) { | 189 } else if (is_linux) { |
| 198 libs = [ "dl" ] | 190 libs = [ "dl" ] |
| 199 } | 191 } |
| 200 } | 192 } |
| OLD | NEW |