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
3 # found in the LICENSE file.
5 import("//build/config/ui.gni")
8 # When set, turns off the (normally-on) iterator debugging and related stuff
9 # that is normall turned on for Debug builds. These are generally useful for
10 # catching bugs but in some cases may cause conflicts or excessive slowness.
11 disable_iterator_debugging = false
14 # TODO(brettw) Most of these should be removed. Instead of global feature
15 # flags, we should have more modular flags that apply only to a target and its
16 # dependents. For example, depending on the "x11" meta-target should define
17 # USE_X11 for all dependents so that everything that could use X11 gets the
18 # define, but anything that doesn't depend on X11 doesn't see it.
20 # For now we define these globally to match the current GYP build.
21 config("feature_flags") {
22 # TODO(brettw) most of these need to be parameterized.
25 "USE_LIBJPEG_TURBO=1",
26 "ENABLE_ONE_CLICK_SIGNIN",
29 "ENABLE_CONFIGURATION_POLICY",
30 "ENABLE_INPUT_SPEECH",
31 "ENABLE_NOTIFICATIONS",
33 "ENABLE_TASK_MANAGER=1",
34 "ENABLE_EXTENSIONS=1",
35 "ENABLE_PLUGIN_INSTALLATION=1",
37 "ENABLE_SESSION_SERVICE=1",
39 "ENABLE_AUTOFILL_DIALOG=1",
40 "ENABLE_BACKGROUND=1",
41 "ENABLE_AUTOMATION=1",
42 "ENABLE_GOOGLE_NOW=1",
44 "ENABLE_CAPTIVE_PORTAL_DETECTION=1",
46 "ENABLE_MESSAGE_CENTER=1",
47 "ENABLE_SETTINGS_APP=1",
48 "ENABLE_MANAGED_USERS=1",
52 defines += [ "TOOLKIT_VIEWS=1" ]
55 defines += [ "USE_ASH=1" ]
58 defines += [ "USE_AURA=1" ]
61 defines += [ "USE_GLIB=1" ]
64 defines += [ "USE_OZONE=1" ]
67 defines += [ "USE_X11=1" ]
71 # Debug/release ----------------------------------------------------------------
76 "DYNAMIC_ANNOTATIONS_ENABLED=1",
77 "WTF_USE_DYNAMIC_ANNOTATIONS=1",
81 if (disable_iterator_debugging) {
82 # Iterator debugging is enabled by the compiler on debug builds, and we
83 # have to tell it to turn it off.
84 defines += [ "_HAS_ITERATOR_DEBUGGING=0" ]
86 } else if (is_linux && !is_android && cpu_arch == "x64" &&
87 !disable_iterator_debugging) {
88 # Enable libstdc++ debugging facilities to help catch problems early, see
89 # http://crbug.com/65151 .
90 # TODO(phajdan.jr): Should we enable this for all of POSIX?
91 defines += [ "_GLIBCXX_DEBUG=1" ]
98 # Default libraries ------------------------------------------------------------
100 # This config defines the default libraries applied to all targets.
101 config("default_libs") {
103 # TODO(brettw) this list of defaults should probably be smaller, and
104 # instead the targets that use the less common ones (e.g. wininet or
105 # winspool) should include those explicitly.
131 } else if (is_android) {
132 # Android uses -nostdlib so we need to add even libc here.
134 # TODO(brettw) write a version of this, hopefully we can express this
135 # without forking out to GCC just to get the library name. The android
136 # toolchain directory should probably be extracted into a .gni file that
137 # this file and the android toolchain .gn file can share.
138 # # Manually link the libgcc.a that the cross compiler uses.
139 # '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)',
147 "ApplicationServices.framework",
149 "CoreFoundation.framework",
150 "Foundation.framework",
152 "Security.framework",
156 "CoreFoundation.framework",
157 "CoreGraphics.framework",
158 "CoreText.framework",
159 "Foundation.framework",
162 } else if (is_linux) {