Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(469)

Side by Side Diff: build/config/BUILD.gn

Issue 1141793003: Update from https://crrev.com/329939 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/common.gypi ('k') | build/config/BUILDCONFIG.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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")
11 11
12 declare_args() { 12 declare_args() {
13 # When set, turns off the (normally-on) iterator debugging and related stuff 13 # When set, turns off the (normally-on) iterator debugging and related stuff
14 # that is normally turned on for Debug builds. These are generally useful for 14 # that is normally turned on for Debug builds. These are generally useful for
15 # catching bugs but in some cases may cause conflicts or excessive slowness. 15 # catching bugs but in some cases may cause conflicts or excessive slowness.
16 disable_iterator_debugging = false 16 disable_iterator_debugging = false
17 17
18 # Set to true to not store any build metadata, e.g. ifdef out all __DATE__ 18 # Set to true to not store any build metadata, e.g. ifdef out all __DATE__
19 # and __TIME__. Set to 0 to reenable the use of these macros in the code 19 # and __TIME__. Set to 0 to reenable the use of these macros in the code
20 # base. See http://crbug.com/314403. 20 # base. See http://crbug.com/314403.
21 # 21 #
22 # Continue to embed build meta data in Official builds, basically the 22 # Continue to embed build meta data in Official builds, basically the
23 # time it was built. 23 # time it was built.
24 # TODO(maruel): This decision should be revisited because having an 24 # TODO(maruel): This decision should be revisited because having an
25 # official deterministic build has high value too but MSVC toolset can't 25 # official deterministic build has high value too but MSVC toolset can't
26 # generate anything deterministic with WPO enabled AFAIK. 26 # generate anything deterministic with WPO enabled AFAIK.
27 dont_embed_build_metadata = is_official_build 27 dont_embed_build_metadata = !is_official_build
28 28
29 # Set to true to enable dcheck in Release builds. 29 # Set to true to enable dcheck in Release builds.
30 dcheck_always_on = false 30 dcheck_always_on = false
31 31
32 # Set to true to compile with the OpenGL ES 2.0 conformance tests. 32 # Set to true to compile with the OpenGL ES 2.0 conformance tests.
33 internal_gles2_conform_tests = false 33 internal_gles2_conform_tests = false
34 } 34 }
35 35
36 # TODO(brettw) Most of these should be removed. Instead of global feature 36 # TODO(brettw) Most of these should be removed. Instead of global feature
37 # flags, we should have more modular flags that apply only to a target and its 37 # flags, we should have more modular flags that apply only to a target and its
38 # dependents. For example, depending on the "x11" meta-target should define 38 # dependents. For example, depending on the "x11" meta-target should define
39 # USE_X11 for all dependents so that everything that could use X11 gets the 39 # USE_X11 for all dependents so that everything that could use X11 gets the
40 # define, but anything that doesn't depend on X11 doesn't see it. 40 # define, but anything that doesn't depend on X11 doesn't see it.
41 # 41 #
42 # For now we define these globally to match the current GYP build. 42 # For now we define these globally to match the current GYP build.
43 config("feature_flags") { 43 config("feature_flags") {
44 # TODO(brettw) most of these need to be parameterized. 44 # TODO(brettw) this probably needs to be parameterized.
45 defines = [ 45 defines = [ "V8_DEPRECATION_WARNINGS" ] # Don't use deprecated V8 APIs anywhe re.
46 "CHROMIUM_BUILD",
47 "V8_DEPRECATION_WARNINGS", # Don't use deprecated V8 APIs anywhere.
48 ]
49 46
50 if (cld_version > 0) { 47 if (cld_version > 0) {
51 defines += [ "CLD_VERSION=$cld_version" ] 48 defines += [ "CLD_VERSION=$cld_version" ]
52 } 49 }
53 if (enable_mdns) { 50 if (enable_mdns) {
54 defines += [ "ENABLE_MDNS=1" ] 51 defines += [ "ENABLE_MDNS=1" ]
55 } 52 }
56 if (enable_notifications) { 53 if (enable_notifications) {
57 defines += [ "ENABLE_NOTIFICATIONS" ] 54 defines += [ "ENABLE_NOTIFICATIONS" ]
58 } 55 }
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 defines += [ "VIDEO_HOLE=1" ] 228 defines += [ "VIDEO_HOLE=1" ]
232 } 229 }
233 if (safe_browsing_mode == 1) { 230 if (safe_browsing_mode == 1) {
234 defines += [ "FULL_SAFE_BROWSING" ] 231 defines += [ "FULL_SAFE_BROWSING" ]
235 defines += [ "SAFE_BROWSING_CSD" ] 232 defines += [ "SAFE_BROWSING_CSD" ]
236 defines += [ "SAFE_BROWSING_DB_LOCAL" ] 233 defines += [ "SAFE_BROWSING_DB_LOCAL" ]
237 defines += [ "SAFE_BROWSING_SERVICE" ] 234 defines += [ "SAFE_BROWSING_SERVICE" ]
238 } else if (safe_browsing_mode == 2) { 235 } else if (safe_browsing_mode == 2) {
239 defines += [ "MOBILE_SAFE_BROWSING" ] 236 defines += [ "MOBILE_SAFE_BROWSING" ]
240 defines += [ "SAFE_BROWSING_SERVICE" ] 237 defines += [ "SAFE_BROWSING_SERVICE" ]
238 } else if (safe_browsing_mode == 3) {
239 defines += [ "MOBILE_SAFE_BROWSING" ]
240 defines += [ "SAFE_BROWSING_DB_REMOTE" ]
241 defines += [ "SAFE_BROWSING_SERVICE" ]
242 }
243 if (is_official_build) {
244 defines += [ "OFFICIAL_BUILD" ]
245 }
246 if (is_chrome_branded) {
247 defines += [ "GOOGLE_CHROME_BUILD" ]
248 } else {
249 defines += [ "CHROMIUM_BUILD" ]
241 } 250 }
242 } 251 }
243 252
244 # Debug/release ---------------------------------------------------------------- 253 # Debug/release ----------------------------------------------------------------
245 254
246 config("debug") { 255 config("debug") {
247 defines = [ 256 defines = [
248 "_DEBUG", 257 "_DEBUG",
249 "DYNAMIC_ANNOTATIONS_ENABLED=1", 258 "DYNAMIC_ANNOTATIONS_ENABLED=1",
250 "WTF_USE_DYNAMIC_ANNOTATIONS=1", 259 "WTF_USE_DYNAMIC_ANNOTATIONS=1",
(...skipping 13 matching lines...) Expand all
264 !disable_iterator_debugging) { 273 !disable_iterator_debugging) {
265 # Enable libstdc++ debugging facilities to help catch problems early, see 274 # Enable libstdc++ debugging facilities to help catch problems early, see
266 # http://crbug.com/65151 . 275 # http://crbug.com/65151 .
267 # TODO(phajdan.jr): Should we enable this for all of POSIX? 276 # TODO(phajdan.jr): Should we enable this for all of POSIX?
268 defines += [ "_GLIBCXX_DEBUG=1" ] 277 defines += [ "_GLIBCXX_DEBUG=1" ]
269 } 278 }
270 } 279 }
271 280
272 config("release") { 281 config("release") {
273 defines = [ "NDEBUG" ] 282 defines = [ "NDEBUG" ]
283
284 # Sanitizers.
285 # 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.
287 if (!is_tsan) {
288 defines += [ "NVALGRIND" ]
289 if (!is_nacl) {
290 # NaCl always enables dynamic annotations. Currently this value is set to
291 # 1 for all .nexes.
292 defines += [ "DYNAMIC_ANNOTATIONS_ENABLED=0" ]
293 }
294 }
274 } 295 }
275 296
276 # Default libraries ------------------------------------------------------------ 297 # Default libraries ------------------------------------------------------------
277 298
278 # This config defines the default libraries applied to all targets. 299 # This config defines the default libraries applied to all targets.
279 config("default_libs") { 300 config("default_libs") {
280 if (is_win) { 301 if (is_win) {
281 # TODO(brettw) this list of defaults should probably be smaller, and 302 # TODO(brettw) this list of defaults should probably be smaller, and
282 # instead the targets that use the less common ones (e.g. wininet or 303 # instead the targets that use the less common ones (e.g. wininet or
283 # winspool) should include those explicitly. 304 # winspool) should include those explicitly.
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 "CoreFoundation.framework", 360 "CoreFoundation.framework",
340 "CoreGraphics.framework", 361 "CoreGraphics.framework",
341 "CoreText.framework", 362 "CoreText.framework",
342 "Foundation.framework", 363 "Foundation.framework",
343 "UIKit.framework", 364 "UIKit.framework",
344 ] 365 ]
345 } else if (is_linux) { 366 } else if (is_linux) {
346 libs = [ "dl" ] 367 libs = [ "dl" ]
347 } 368 }
348 } 369 }
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | build/config/BUILDCONFIG.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698