summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-24 21:29:49 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-24 21:29:49 +0000
commit3ad0946b31fa66869ac1843dadc5e6bc769d0869 (patch)
tree7e81d796d6be11b3a6e302b58c729a87d353a143
parent8018c2d87872073c3e5a8c7d3fe1289796bda3e8 (diff)
downloadchromium_src-3ad0946b31fa66869ac1843dadc5e6bc769d0869.zip
chromium_src-3ad0946b31fa66869ac1843dadc5e6bc769d0869.tar.gz
chromium_src-3ad0946b31fa66869ac1843dadc5e6bc769d0869.tar.bz2
GN: Work on Linux build defines
This makes the -D defines for the default desktop Linux build of re2 in GN match that of GYP. This moves the SSL configuration stuff into the root build directory. It's better to match the GYP build exactly for ease of landing even though this is a stupid dependency. Fixes the help text that still references the implicit "gen" command (I removed this). R=scottmg@chromium.org Review URL: https://codereview.chromium.org/170533003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252981 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--build/config/BUILD.gn54
-rw-r--r--build/config/crypto.gni (renamed from tools/gn/secondary/crypto/ssl/flags.gni)3
-rw-r--r--build/config/features.gni49
-rw-r--r--build/config/ui.gni23
-rwxr-xr-xbuild/gyp_chromium6
-rw-r--r--tools/gn/command_help.cc2
-rw-r--r--tools/gn/secondary/chrome/BUILD.gn2
-rw-r--r--tools/gn/secondary/crypto/BUILD.gn2
-rw-r--r--tools/gn/secondary/crypto/ssl/BUILD.gn2
-rw-r--r--tools/gn/secondary/net/BUILD.gn2
10 files changed, 136 insertions, 9 deletions
diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn
index 1831500..d0b14c2 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/crypto.gni")
+import("//build/config/features.gni")
import("//build/config/ui.gni")
declare_args() {
@@ -33,38 +35,84 @@ config("feature_flags") {
"ENABLE_TASK_MANAGER=1",
"ENABLE_EXTENSIONS=1",
"ENABLE_PLUGIN_INSTALLATION=1",
- "ENABLE_PLUGINS=1",
"ENABLE_SESSION_SERVICE=1",
"ENABLE_THEMES=1",
"ENABLE_AUTOFILL_DIALOG=1",
"ENABLE_BACKGROUND=1",
"ENABLE_AUTOMATION=1",
"ENABLE_GOOGLE_NOW=1",
- "ENABLE_PRINTING=1",
"ENABLE_CAPTIVE_PORTAL_DETECTION=1",
"ENABLE_APP_LIST=1",
- "ENABLE_MESSAGE_CENTER=1",
"ENABLE_SETTINGS_APP=1",
"ENABLE_MANAGED_USERS=1",
+ "V8_DEPRECATION_WARNINGS", # Don't use deprecated V8 APIs anywhere.
]
+ if (cld_version > 0) {
+ defines += [ "CLD_VERSION=$cld_version" ]
+ }
+ if (enable_mdns) {
+ defines += [ "ENABLE_MDNS=1" ]
+ }
+ if (enable_pepper_cdms) {
+ # TODO(brettw) should probably be "=1"
+ defines += [ "ENABLE_PEPPER_CDMS" ]
+ }
+ if (enable_plugins) {
+ defines += [ "ENABLE_PLUGINS=1" ]
+ }
+ if (enable_printing > 0) {
+ defines += [ "ENABLE_PRINTING=1" ]
+ if (enable_printing < 2) {
+ defines += [ "ENABLE_FULL_PRINTING=1" ]
+ }
+ }
+ if (enable_spellcheck) {
+ defines += [ "ENABLE_SPELLCHECK=1" ]
+ }
+ if (use_udev) {
+ # TODO(brettw) should probably be "=1".
+ defines += [ "USE_UDEV" ]
+ }
if (toolkit_views) {
defines += [ "TOOLKIT_VIEWS=1" ]
}
+ if (ui_compositor_image_transport) {
+ # TODO(brettw) should probably be "=1".
+ defines += [ "UI_COMPOSITOR_IMAGE_TRANSPORT" ]
+ }
if (use_ash) {
defines += [ "USE_ASH=1" ]
}
if (use_aura) {
defines += [ "USE_AURA=1" ]
}
+ if (use_cairo) {
+ defines += [ "USE_CAIRO=1" ]
+ }
+ if (use_clipboard_aurax11) {
+ defines += [ "USE_CLIPBOARD_AURAX11=1" ]
+ }
+ if (use_default_render_theme) {
+ defines += [ "USE_DEFAULT_RENDER_THEME=1" ]
+ }
if (use_glib) {
defines += [ "USE_GLIB=1" ]
}
+ if (use_nss) {
+ defines += [ "USE_NSS=1" ]
+ }
+ if (use_openssl) {
+ defines += [ "USE_OPENSSL=1" ]
+ }
if (use_ozone) {
defines += [ "USE_OZONE=1" ]
}
if (use_x11) {
defines += [ "USE_X11=1" ]
+ if (use_xi2_mt > 0) {
+ defines += [ "USE_XI2_MT=$use_xi2_mt" ]
+ }
}
}
diff --git a/tools/gn/secondary/crypto/ssl/flags.gni b/build/config/crypto.gni
index 6891c49..dee6a20 100644
--- a/tools/gn/secondary/crypto/ssl/flags.gni
+++ b/build/config/crypto.gni
@@ -3,6 +3,9 @@
# found in the LICENSE file.
# This file declares build flags for the SSL library configuration.
+#
+# TODO(brettw) this should probably be moved to src/crypto or somewhere, and
+# the global build dependency on it should be removed.
declare_args() {
# Use OpenSSL instead of NSS. This is used for Android and is experimental
diff --git a/build/config/features.gni b/build/config/features.gni
new file mode 100644
index 0000000..a0db6e6
--- /dev/null
+++ b/build/config/features.gni
@@ -0,0 +1,49 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# This file contains UI-related build flags. It should theoretically be in the
+# src/ui directory and only things that depend on the ui module should get the
+# definitions.
+#
+# However, today we have many "bad" dependencies on some of these flags from,
+# e.g. base, so they need to be global.
+#
+# See also build/config/ui.gni
+
+declare_args() {
+ # Multicast DNS.
+ enable_mdns = is_win || is_linux
+
+ enable_plugins = !is_android || !is_ios
+}
+
+# Additional dependent variables -----------------------------------------------
+
+# Set the version of CLD.
+# 0: Don't specify the version. This option is for the Finch testing.
+# 1: Use only CLD1.
+# 2: Use only CLD2.
+if (is_android || is_ios) {
+ cld_version = 1
+} else {
+ cld_version = 2
+}
+
+# libudev usage. This currently only affects the content layer.
+use_udev = is_linux
+
+# Enable the spell checker.
+enable_spellcheck = !is_android
+
+enable_pepper_cdms = enable_plugins && (is_linux || is_mac || is_win)
+
+# Enable printing support and UI. This variable is used to configure which
+# parts of printing will be built. 0 disables printing completely, 1 enables it
+# fully, and 2 enables only the codepath to generate a Metafile (e.g. usually
+# a PDF or EMF) and disables print preview, cloud print, UI, etc.
+if (is_android) {
+ enable_printing = 2
+} else {
+ enable_printing = 1
+}
diff --git a/build/config/ui.gni b/build/config/ui.gni
index 08964df..75394a9 100644
--- a/build/config/ui.gni
+++ b/build/config/ui.gni
@@ -8,6 +8,8 @@
#
# However, today we have many "bad" dependencies on some of these flags from,
# e.g. base, so they need to be global.
+#
+# See also build/config/features.gni
declare_args() {
# Indicates if Ash is enabled. Ash is the Aura SHell which provides a
@@ -22,6 +24,10 @@ declare_args() {
# of a replacement for GDI or GTK.
use_aura = is_linux || use_ozone || is_win || is_chromeos || use_ash
+ # XInput2 multitouch support. Zero means disabled, nonzero indicates the
+ # minimum XI2 version. For example, use_xi2_mt=2 means XI2.2 or above.
+ use_xi2_mt = 2
+
# True means the UI is built useing the "views" framework.
toolkit_views = is_win || is_chromeos || use_aura
}
@@ -30,10 +36,27 @@ declare_args() {
#
# These variables depend on other variables and can't be set externally.
+if (is_linux) {
+ use_cairo = true
+ use_pango = true
+} else {
+ use_cairo = false
+ use_pango = false
+}
+
# Indicates if the UI toolkit depends on GTK.
toolkit_uses_gtk = is_linux && !is_chromeos && !use_aura && !use_ozone
+# Use GPU accelerated cross process image transport by default on linux builds
+# with the Aura window manager.
+ui_compositor_image_transport = use_aura && is_linux
+
+use_default_render_theme = use_aura || is_linux
+
# Indicates if the UI toolkit depends on X11.
use_x11 = is_linux && !use_ozone
use_glib = is_linux
+
+use_clipboard_aurax11 = is_linux && use_aura && use_x11
+
diff --git a/build/gyp_chromium b/build/gyp_chromium
index a158f39..ec400e1 100755
--- a/build/gyp_chromium
+++ b/build/gyp_chromium
@@ -207,6 +207,10 @@ def GetArgsStringForGN(vars_dict):
('clang', '1', 'is_clang=true'),
('clang_use_chrome_plugins', '0', 'clang_use_chrome_plugins=false'),
('disable_glibcxx_debug', '1', 'disable_iterator_debugging=true'),
+ ('enable_mdns', '0', 'enable_mdns=false'),
+ ('enable_mdns', '1', 'enable_mdns=true'),
+ ('enable_plugins', '0', 'enable_plugins=false'),
+ ('enable_plugins', '1', 'enable_plugins=true'),
('target_arch', 'ia32', 'cpu_arch="x86"'),
('target_arch', 'x64', 'cpu_arch="x64" force_win64=true'),
('target_arch', 'arm', 'cpu_arch="arm"'),
@@ -219,6 +223,8 @@ def GetArgsStringForGN(vars_dict):
('chromeos', '1', 'os="chromeos"'),
('use_aura', '1', 'use_aura=true'),
('use_goma', '1', 'use_goma=true'),
+ ('use_openssl', '0', 'use_openssl=false'),
+ ('use_openssl', '1', 'use_openssl=true'),
('asan', '1', 'is_asan=true'),
('lsan', '1', 'is_lsan=true'),
('msan', '1', 'is_msan=true'),
diff --git a/tools/gn/command_help.cc b/tools/gn/command_help.cc
index 426b015..14defea 100644
--- a/tools/gn/command_help.cc
+++ b/tools/gn/command_help.cc
@@ -30,8 +30,6 @@ void PrintToplevelHelp() {
OutputString(
"\n"
- " When run with no arguments \"gn gen\" is assumed.\n"
- "\n"
"Common switches:\n");
PrintShortHelp(
"--args: Specifies build arguments overrides. "
diff --git a/tools/gn/secondary/chrome/BUILD.gn b/tools/gn/secondary/chrome/BUILD.gn
index ff72231..1728a83 100644
--- a/tools/gn/secondary/chrome/BUILD.gn
+++ b/tools/gn/secondary/chrome/BUILD.gn
@@ -2,8 +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/crypto.gni")
import("//build/config/ui.gni")
-import("//crypto/ssl/flags.gni")
import("//tools/grit/grit_rule.gni")
executable("chrome") {
diff --git a/tools/gn/secondary/crypto/BUILD.gn b/tools/gn/secondary/crypto/BUILD.gn
index 0238740..07c78c2d7 100644
--- a/tools/gn/secondary/crypto/BUILD.gn
+++ b/tools/gn/secondary/crypto/BUILD.gn
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import("ssl/flags.gni")
+import("//build/config/crypto.gni")
crypto_minimal_sources = [
"hmac.cc",
diff --git a/tools/gn/secondary/crypto/ssl/BUILD.gn b/tools/gn/secondary/crypto/ssl/BUILD.gn
index 0cb3ce0..fac0228 100644
--- a/tools/gn/secondary/crypto/ssl/BUILD.gn
+++ b/tools/gn/secondary/crypto/ssl/BUILD.gn
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import("flags.gni")
+import("//build/config/crypto.gni")
import("//build/config/linux/pkg_config.gni")
config("ssl_preprocessor_flags") {
diff --git a/tools/gn/secondary/net/BUILD.gn b/tools/gn/secondary/net/BUILD.gn
index 8a8d121..f8b56a9 100644
--- a/tools/gn/secondary/net/BUILD.gn
+++ b/tools/gn/secondary/net/BUILD.gn
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import("//crypto/ssl/flags.gni")
+import("//build/config/crypto.gni")
import("//tools/grit/grit_rule.gni")
component("net") {