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

Unified Diff: build/config/BUILD.gn

Issue 160143002: Hook up more GN toolkit and UI-based flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/test/BUILD.gn ('k') | build/config/BUILDCONFIG.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/BUILD.gn
diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn
index 9fb392721a29df20afdf581bd621af7719977a35..462008c2a1e750f0ab4ed77d9bf4ac50e2ba1e56 100644
--- a/build/config/BUILD.gn
+++ b/build/config/BUILD.gn
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build/config/ui.gni")
+
declare_args() {
# When set, turns off the (normally-on) iterator debugging and related stuff
# that is normall turned on for Debug builds. These are generally useful for
@@ -9,11 +11,17 @@ declare_args() {
disable_iterator_debugging = false
}
-# TODO(brettw) this is a hack to set the feature flags we use.
-config("my_msvs") {
+# TODO(brettw) Most of these should be removed. Instead of global feature
+# flags, we should have more modular flags that apply only to a target and its
+# dependents. For example, depending on the "x11" meta-target should define
+# USE_X11 for all dependents so that everything that could use X11 gets the
+# define, but anything that doesn't depend on X11 doesn't see it.
+#
+# For now we define these globally to match the current GYP build.
+config("feature_flags") {
+ # TODO(brettw) most of these need to be parameterized.
defines = [
"CHROMIUM_BUILD",
- "TOOLKIT_VIEWS=1",
"USE_LIBJPEG_TURBO=1",
"ENABLE_ONE_CLICK_SIGNIN",
"ENABLE_REMOTING=1",
@@ -40,12 +48,24 @@ config("my_msvs") {
"ENABLE_MANAGED_USERS=1",
]
+ if (toolkit_views) {
+ defines += [ "TOOLKIT_VIEWS=1" ]
+ }
+ if (use_ash) {
+ defines += [ "USE_ASH=1" ]
+ }
if (use_aura) {
defines += [ "USE_AURA=1" ]
}
-}
-
-config("feature_flags") {
+ if (use_glib) {
+ defines += [ "USE_GLIB=1" ]
+ }
+ if (use_ozone) {
+ defines += [ "USE_OZONE=1" ]
+ }
+ if (use_x11) {
+ defines += [ "USE_X11=1" ]
+ }
}
# Debug/release ----------------------------------------------------------------
« no previous file with comments | « base/test/BUILD.gn ('k') | build/config/BUILDCONFIG.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698