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

Unified Diff: build/common.gypi

Issue 6015016: Some clean ups to build/common.gypi. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/build
Patch Set: rebase Created 9 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/common.gypi
diff --git a/build/common.gypi b/build/common.gypi
index f914684aa831431e892ec1b3fe45ee056bee5255..5d3ef05696ccdf215dbb3c8b1422fa44d9e10895 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -6,43 +6,31 @@
# Please don't directly include this file if you are building via gyp_chromium,
# since gyp_chromium is automatically forcing its inclusion.
{
+ # Variables expected to be overriden on the GYP command line (-D) or by
+ # ~/.gyp/include.gypi.
'variables': {
- # .gyp files or targets should set chromium_code to 1 if they build
- # Chromium-specific code, as opposed to external code. This variable is
- # used to control such things as the set of warnings to enable, and
- # whether warnings are treated as errors.
- 'chromium_code%': 0,
-
- 'internal_pdf%': 0,
-
- # This allows to use libcros from the current system, ie. /usr/lib/
- # The cros_api will be pulled in as a static library, and all headers
- # from the system include dirs.
- 'system_libcros%': '0',
-
- # Variables expected to be overriden on the GYP command line (-D) or by
- # ~/.gyp/include.gypi.
-
# Putting a variables dict inside another variables dict looks kind of
- # weird. This is done so that "branding" and "buildtype" are defined as
+ # weird. This is done so that 'host_arch', 'chromeos', etc are defined as
# variables within the outer variables dict here. This is necessary
# to get these variables defined for the conditions within this variables
- # dict that operate on these variables.
+ # dict that operate on these variables (e.g., for setting 'toolkit_views',
+ # we need to have 'chromeos' already set).
'variables': {
- # Override branding to select the desired branding flavor.
- 'branding%': 'Chromium',
+ 'variables': {
+ # Whether we're building a ChromeOS build.
+ 'chromeos%': '0',
- # Override buildtype to select the desired build flavor.
- # Dev - everyday build for development/testing
- # Official - release build (generally implies additional processing)
- # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
- # conversion is done), some of the things which are now controlled by
- # 'branding', such as symbol generation, will need to be refactored based
- # on 'buildtype' (i.e. we don't care about saving symbols for non-Official
- # builds).
- 'buildtype%': 'Dev',
+ # Disable touch support by default.
+ 'touchui%': 0,
+
+ # To do a shared build on linux we need to be able to choose between
+ # type static_library and shared_library. We default to doing a static
+ # build but you can override this with "gyp -Dlibrary=shared_library"
+ # or you can add the following line (without the #) to
+ # ~/.gyp/include.gypi {'variables': {'library': 'shared_library'}}
+ # to compile as shared by default
+ 'library%': 'static_library',
- 'variables': {
# Compute the architecture that we're building on.
'conditions': [
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
@@ -55,64 +43,31 @@
'host_arch%': 'ia32',
}],
],
-
- # Whether we're building a ChromeOS build. We set the initial
- # value at this level of nesting so it's available for the
- # toolkit_views test below.
- 'chromeos%': '0',
-
- # Disable touch support by default.
- 'touchui%': 0,
-
- # To do a shared build on linux we need to be able to choose between
- # type static_library and shared_library. We default to doing a static
- # build but you can override this with "gyp -Dlibrary=shared_library"
- # or you can add the following line (without the #) to
- # ~/.gyp/include.gypi {'variables': {'library': 'shared_library'}}
- # to compile as shared by default
- 'library%': 'static_library',
},
- # We set those at this level of nesting so the values are available for
- # other conditionals below.
- 'conditions': [
- # Set default value of toolkit_views on for Windows, Chrome OS
- # and the touch UI.
- ['OS=="win" or chromeos==1 or touchui==1', {
- 'toolkit_views%': 1,
- }, {
- 'toolkit_views%': 0,
- }],
-
- # A flag to enable or disable our compile-time dependency
- # on gnome-keyring. If that dependency is disabled, no gnome-keyring
- # support will be available. This option is useful
- # for Linux distributions.
- ['chromeos==1', {
- 'use_gnome_keyring%': 0,
- }, {
- 'use_gnome_keyring%': 1,
- }],
+ # Copy conditionally-set variables out one scope.
+ 'chromeos%': '<(chromeos)',
+ 'touchui%': '<(touchui)',
+ 'host_arch%': '<(host_arch)',
+ 'library%': '<(library)',
- # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
- # libraries on linux x86-64 and arm.
- ['host_arch=="ia32"', {
- 'linux_fpic%': 0,
- }, {
- 'linux_fpic%': 1,
- }],
- ],
+ # Override branding to select the desired branding flavor.
+ 'branding%': 'Chromium',
- 'host_arch%': '<(host_arch)',
+ # Override buildtype to select the desired build flavor.
+ # Dev - everyday build for development/testing
+ # Official - release build (generally implies additional processing)
+ # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
+ # conversion is done), some of the things which are now controlled by
+ # 'branding', such as symbol generation, will need to be refactored based
+ # on 'buildtype' (i.e. we don't care about saving symbols for non-Official
+ # builds).
+ 'buildtype%': 'Dev',
# Default architecture we're building for is the architecture we're
# building on.
'target_arch%': '<(host_arch)',
- # Copy conditionally-set variables out one scope.
- 'chromeos%': '<(chromeos)',
- 'touchui%': '<(touchui)',
-
# This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
# are built under a chromium full build (1) or a webkit.org chromium
# build (0).
@@ -137,24 +92,46 @@
# On Linux, we build with sse2 for Chromium builds.
'disable_sse2%': 0,
- # Remoting compilation is enabled by default. Set to 0 to disable.
- 'remoting%': 1,
-
# Use libjpeg-turbo as the JPEG codec used by Chromium.
'use_libjpeg_turbo%': 0,
- 'library%': '<(library)',
-
# Variable 'component' is for cases where we would like to build some
# components as dynamic shared libraries but still need variable
# 'library' for static libraries.
# By default, component is set to whatever library is set to and
# it can be overriden by the GYP command line or by ~/.gyp/include.gypi.
'component%': '<(library)',
+
+ 'conditions': [
+ # Set default value of toolkit_views on for Windows, Chrome OS
+ # and the touch UI.
+ ['OS=="win" or chromeos==1 or touchui==1', {
+ 'toolkit_views%': 1,
+ }, {
+ 'toolkit_views%': 0,
+ }],
+
+ # A flag to enable or disable our compile-time dependency
+ # on gnome-keyring. If that dependency is disabled, no gnome-keyring
+ # support will be available. This option is useful
+ # for Linux distributions.
+ ['chromeos==1', {
+ 'use_gnome_keyring%': 0,
+ }, {
+ 'use_gnome_keyring%': 1,
+ }],
+
+ # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
+ # libraries on linux x86-64 and arm.
+ ['host_arch=="ia32"', {
+ 'linux_fpic%': 0,
+ }, {
+ 'linux_fpic%': 1,
+ }],
+ ],
},
- # Define branding and buildtype on the basis of their settings within the
- # variables sub-dict above, unless overridden.
+ # Copy conditionally-set variables out one scope.
'branding%': '<(branding)',
'buildtype%': '<(buildtype)',
'target_arch%': '<(target_arch)',
@@ -171,7 +148,6 @@
'arm_neon%': '<(arm_neon)',
'sysroot%': '<(sysroot)',
'disable_sse2%': '<(disable_sse2)',
- 'remoting%': '<(remoting)',
'library%': '<(library)',
'component%': '<(component)',
@@ -323,6 +299,34 @@
# Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
'use_openssl%': 0,
+ # .gyp files or targets should set chromium_code to 1 if they build
+ # Chromium-specific code, as opposed to external code. This variable is
+ # used to control such things as the set of warnings to enable, and
+ # whether warnings are treated as errors.
+ 'chromium_code%': 0,
+
+ # Set to 1 to compile with the built in pdf viewer.
+ 'internal_pdf%': 0,
+
+ # This allows to use libcros from the current system, ie. /usr/lib/
+ # The cros_api will be pulled in as a static library, and all headers
+ # from the system include dirs.
+ 'system_libcros%': '0',
+
+ # Remoting compilation is enabled by default. Set to 0 to disable.
+ 'remoting%': 1,
+
+ # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
+ # so Cocoa is happy (http://crbug.com/20441).
+ 'locales': [
+ 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
+ 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
+ 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
+ 'ml', 'mr', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
+ 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
+ 'vi', 'zh-CN', 'zh-TW',
+ ],
+
# Use Harfbuzz-NG instead of Harfbuzz.
# Under development: http://crbug.com/68551
'use_harfbuzz_ng%': 0,
@@ -415,17 +419,6 @@
'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
}], # use_libjpeg_turbo==1
],
-
- # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
- # so Cocoa is happy (http://crbug.com/20441).
- 'locales': [
- 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
- 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
- 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
- 'ml', 'mr', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
- 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
- 'vi', 'zh-CN', 'zh-TW',
- ],
},
'target_defaults': {
'variables': {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698