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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2010 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 # IMPORTANT: 5 # IMPORTANT:
6 # Please don't directly include this file if you are building via gyp_chromium, 6 # Please don't directly include this file if you are building via gyp_chromium,
7 # since gyp_chromium is automatically forcing its inclusion. 7 # since gyp_chromium is automatically forcing its inclusion.
8 { 8 {
9 # Variables expected to be overriden on the GYP command line (-D) or by
10 # ~/.gyp/include.gypi.
9 'variables': { 11 'variables': {
10 # .gyp files or targets should set chromium_code to 1 if they build
11 # Chromium-specific code, as opposed to external code. This variable is
12 # used to control such things as the set of warnings to enable, and
13 # whether warnings are treated as errors.
14 'chromium_code%': 0,
15
16 'internal_pdf%': 0,
17
18 # This allows to use libcros from the current system, ie. /usr/lib/
19 # The cros_api will be pulled in as a static library, and all headers
20 # from the system include dirs.
21 'system_libcros%': '0',
22
23 # Variables expected to be overriden on the GYP command line (-D) or by
24 # ~/.gyp/include.gypi.
25
26 # Putting a variables dict inside another variables dict looks kind of 12 # Putting a variables dict inside another variables dict looks kind of
27 # weird. This is done so that "branding" and "buildtype" are defined as 13 # weird. This is done so that 'host_arch', 'chromeos', etc are defined as
28 # variables within the outer variables dict here. This is necessary 14 # variables within the outer variables dict here. This is necessary
29 # to get these variables defined for the conditions within this variables 15 # to get these variables defined for the conditions within this variables
30 # dict that operate on these variables. 16 # dict that operate on these variables (e.g., for setting 'toolkit_views',
17 # we need to have 'chromeos' already set).
31 'variables': { 18 'variables': {
32 # Override branding to select the desired branding flavor. 19 'variables': {
33 'branding%': 'Chromium', 20 # Whether we're building a ChromeOS build.
21 'chromeos%': '0',
34 22
35 # Override buildtype to select the desired build flavor. 23 # Disable touch support by default.
36 # Dev - everyday build for development/testing 24 'touchui%': 0,
37 # Official - release build (generally implies additional processing)
38 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
39 # conversion is done), some of the things which are now controlled by
40 # 'branding', such as symbol generation, will need to be refactored based
41 # on 'buildtype' (i.e. we don't care about saving symbols for non-Official
42 # builds).
43 'buildtype%': 'Dev',
44 25
45 'variables': { 26 # To do a shared build on linux we need to be able to choose between
27 # type static_library and shared_library. We default to doing a static
28 # build but you can override this with "gyp -Dlibrary=shared_library"
29 # or you can add the following line (without the #) to
30 # ~/.gyp/include.gypi {'variables': {'library': 'shared_library'}}
31 # to compile as shared by default
32 'library%': 'static_library',
33
46 # Compute the architecture that we're building on. 34 # Compute the architecture that we're building on.
47 'conditions': [ 35 'conditions': [
48 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', { 36 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
49 # This handles the Linux platforms we generally deal with. Anything 37 # This handles the Linux platforms we generally deal with. Anything
50 # else gets passed through, which probably won't work very well; suc h 38 # else gets passed through, which probably won't work very well; suc h
51 # hosts should pass an explicit target_arch to gyp. 39 # hosts should pass an explicit target_arch to gyp.
52 'host_arch%': 40 'host_arch%':
53 '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/a rm.*/arm/")', 41 '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/a rm.*/arm/")',
54 }, { # OS!="linux" 42 }, { # OS!="linux"
55 'host_arch%': 'ia32', 43 'host_arch%': 'ia32',
56 }], 44 }],
57 ], 45 ],
58
59 # Whether we're building a ChromeOS build. We set the initial
60 # value at this level of nesting so it's available for the
61 # toolkit_views test below.
62 'chromeos%': '0',
63
64 # Disable touch support by default.
65 'touchui%': 0,
66
67 # To do a shared build on linux we need to be able to choose between
68 # type static_library and shared_library. We default to doing a static
69 # build but you can override this with "gyp -Dlibrary=shared_library"
70 # or you can add the following line (without the #) to
71 # ~/.gyp/include.gypi {'variables': {'library': 'shared_library'}}
72 # to compile as shared by default
73 'library%': 'static_library',
74 }, 46 },
75 47
76 # We set those at this level of nesting so the values are available for 48 # Copy conditionally-set variables out one scope.
77 # other conditionals below. 49 'chromeos%': '<(chromeos)',
78 'conditions': [ 50 'touchui%': '<(touchui)',
79 # Set default value of toolkit_views on for Windows, Chrome OS 51 'host_arch%': '<(host_arch)',
80 # and the touch UI. 52 'library%': '<(library)',
81 ['OS=="win" or chromeos==1 or touchui==1', {
82 'toolkit_views%': 1,
83 }, {
84 'toolkit_views%': 0,
85 }],
86 53
87 # A flag to enable or disable our compile-time dependency 54 # Override branding to select the desired branding flavor.
88 # on gnome-keyring. If that dependency is disabled, no gnome-keyring 55 'branding%': 'Chromium',
89 # support will be available. This option is useful
90 # for Linux distributions.
91 ['chromeos==1', {
92 'use_gnome_keyring%': 0,
93 }, {
94 'use_gnome_keyring%': 1,
95 }],
96 56
97 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared 57 # Override buildtype to select the desired build flavor.
98 # libraries on linux x86-64 and arm. 58 # Dev - everyday build for development/testing
99 ['host_arch=="ia32"', { 59 # Official - release build (generally implies additional processing)
100 'linux_fpic%': 0, 60 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
101 }, { 61 # conversion is done), some of the things which are now controlled by
102 'linux_fpic%': 1, 62 # 'branding', such as symbol generation, will need to be refactored based
103 }], 63 # on 'buildtype' (i.e. we don't care about saving symbols for non-Official
104 ], 64 # builds).
105 65 'buildtype%': 'Dev',
106 'host_arch%': '<(host_arch)',
107 66
108 # Default architecture we're building for is the architecture we're 67 # Default architecture we're building for is the architecture we're
109 # building on. 68 # building on.
110 'target_arch%': '<(host_arch)', 69 'target_arch%': '<(host_arch)',
111 70
112 # Copy conditionally-set variables out one scope.
113 'chromeos%': '<(chromeos)',
114 'touchui%': '<(touchui)',
115
116 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are 71 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
117 # are built under a chromium full build (1) or a webkit.org chromium 72 # are built under a chromium full build (1) or a webkit.org chromium
118 # build (0). 73 # build (0).
119 'inside_chromium_build%': 1, 74 'inside_chromium_build%': 1,
120 75
121 # Set to 1 to enable fast builds. It disables debug info for fastest 76 # Set to 1 to enable fast builds. It disables debug info for fastest
122 # compilation. 77 # compilation.
123 'fastbuild%': 0, 78 'fastbuild%': 0,
124 79
125 # Python version. 80 # Python version.
126 'python_ver%': '2.5', 81 'python_ver%': '2.5',
127 82
128 # Set ARM-v7 compilation flags 83 # Set ARM-v7 compilation flags
129 'armv7%': 0, 84 'armv7%': 0,
130 85
131 # Set Neon compilation flags (only meaningful if armv7==1). 86 # Set Neon compilation flags (only meaningful if armv7==1).
132 'arm_neon%': 1, 87 'arm_neon%': 1,
133 88
134 # The system root for cross-compiles. Default: none. 89 # The system root for cross-compiles. Default: none.
135 'sysroot%': '', 90 'sysroot%': '',
136 91
137 # On Linux, we build with sse2 for Chromium builds. 92 # On Linux, we build with sse2 for Chromium builds.
138 'disable_sse2%': 0, 93 'disable_sse2%': 0,
139 94
140 # Remoting compilation is enabled by default. Set to 0 to disable.
141 'remoting%': 1,
142
143 # Use libjpeg-turbo as the JPEG codec used by Chromium. 95 # Use libjpeg-turbo as the JPEG codec used by Chromium.
144 'use_libjpeg_turbo%': 0, 96 'use_libjpeg_turbo%': 0,
145 97
146 'library%': '<(library)',
147
148 # Variable 'component' is for cases where we would like to build some 98 # Variable 'component' is for cases where we would like to build some
149 # components as dynamic shared libraries but still need variable 99 # components as dynamic shared libraries but still need variable
150 # 'library' for static libraries. 100 # 'library' for static libraries.
151 # By default, component is set to whatever library is set to and 101 # By default, component is set to whatever library is set to and
152 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi. 102 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi.
153 'component%': '<(library)', 103 'component%': '<(library)',
104
105 'conditions': [
106 # Set default value of toolkit_views on for Windows, Chrome OS
107 # and the touch UI.
108 ['OS=="win" or chromeos==1 or touchui==1', {
109 'toolkit_views%': 1,
110 }, {
111 'toolkit_views%': 0,
112 }],
113
114 # A flag to enable or disable our compile-time dependency
115 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
116 # support will be available. This option is useful
117 # for Linux distributions.
118 ['chromeos==1', {
119 'use_gnome_keyring%': 0,
120 }, {
121 'use_gnome_keyring%': 1,
122 }],
123
124 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
125 # libraries on linux x86-64 and arm.
126 ['host_arch=="ia32"', {
127 'linux_fpic%': 0,
128 }, {
129 'linux_fpic%': 1,
130 }],
131 ],
154 }, 132 },
155 133
156 # Define branding and buildtype on the basis of their settings within the 134 # Copy conditionally-set variables out one scope.
157 # variables sub-dict above, unless overridden.
158 'branding%': '<(branding)', 135 'branding%': '<(branding)',
159 'buildtype%': '<(buildtype)', 136 'buildtype%': '<(buildtype)',
160 'target_arch%': '<(target_arch)', 137 'target_arch%': '<(target_arch)',
161 'host_arch%': '<(host_arch)', 138 'host_arch%': '<(host_arch)',
162 'toolkit_views%': '<(toolkit_views)', 139 'toolkit_views%': '<(toolkit_views)',
163 'use_gnome_keyring%': '<(use_gnome_keyring)', 140 'use_gnome_keyring%': '<(use_gnome_keyring)',
164 'linux_fpic%': '<(linux_fpic)', 141 'linux_fpic%': '<(linux_fpic)',
165 'chromeos%': '<(chromeos)', 142 'chromeos%': '<(chromeos)',
166 'touchui%': '<(touchui)', 143 'touchui%': '<(touchui)',
167 'inside_chromium_build%': '<(inside_chromium_build)', 144 'inside_chromium_build%': '<(inside_chromium_build)',
168 'fastbuild%': '<(fastbuild)', 145 'fastbuild%': '<(fastbuild)',
169 'python_ver%': '<(python_ver)', 146 'python_ver%': '<(python_ver)',
170 'armv7%': '<(armv7)', 147 'armv7%': '<(armv7)',
171 'arm_neon%': '<(arm_neon)', 148 'arm_neon%': '<(arm_neon)',
172 'sysroot%': '<(sysroot)', 149 'sysroot%': '<(sysroot)',
173 'disable_sse2%': '<(disable_sse2)', 150 'disable_sse2%': '<(disable_sse2)',
174 'remoting%': '<(remoting)',
175 'library%': '<(library)', 151 'library%': '<(library)',
176 'component%': '<(component)', 152 'component%': '<(component)',
177 153
178 # The release channel that this build targets. This is used to restrict 154 # The release channel that this build targets. This is used to restrict
179 # channel-specific build options, like which installer packages to create. 155 # channel-specific build options, like which installer packages to create.
180 # The default is 'all', which does no channel-specific filtering. 156 # The default is 'all', which does no channel-specific filtering.
181 'channel%': 'all', 157 'channel%': 'all',
182 158
183 # Override chromium_mac_pch and set it to 0 to suppress the use of 159 # Override chromium_mac_pch and set it to 0 to suppress the use of
184 # precompiled headers on the Mac. Prefix header injection may still be 160 # precompiled headers on the Mac. Prefix header injection may still be
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 # Enable a variable used elsewhere throughout the GYP files to determine 292 # Enable a variable used elsewhere throughout the GYP files to determine
317 # whether to compile in the sources for the GPU plugin / process. 293 # whether to compile in the sources for the GPU plugin / process.
318 'enable_gpu%': 1, 294 'enable_gpu%': 1,
319 295
320 # Use GConf, the GNOME configuration system. 296 # Use GConf, the GNOME configuration system.
321 'use_gconf%': 1, 297 'use_gconf%': 1,
322 298
323 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803 299 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
324 'use_openssl%': 0, 300 'use_openssl%': 0,
325 301
302 # .gyp files or targets should set chromium_code to 1 if they build
303 # Chromium-specific code, as opposed to external code. This variable is
304 # used to control such things as the set of warnings to enable, and
305 # whether warnings are treated as errors.
306 'chromium_code%': 0,
307
308 # Set to 1 to compile with the built in pdf viewer.
309 'internal_pdf%': 0,
310
311 # This allows to use libcros from the current system, ie. /usr/lib/
312 # The cros_api will be pulled in as a static library, and all headers
313 # from the system include dirs.
314 'system_libcros%': '0',
315
316 # Remoting compilation is enabled by default. Set to 0 to disable.
317 'remoting%': 1,
318
319 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
320 # so Cocoa is happy (http://crbug.com/20441).
321 'locales': [
322 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
323 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
324 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
325 'ml', 'mr', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
326 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
327 'vi', 'zh-CN', 'zh-TW',
328 ],
329
326 # Use Harfbuzz-NG instead of Harfbuzz. 330 # Use Harfbuzz-NG instead of Harfbuzz.
327 # Under development: http://crbug.com/68551 331 # Under development: http://crbug.com/68551
328 'use_harfbuzz_ng%': 0, 332 'use_harfbuzz_ng%': 0,
329 333
330 'conditions': [ 334 'conditions': [
331 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', { 335 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
332 # This will set gcc_version to XY if you are running gcc X.Y.*. 336 # This will set gcc_version to XY if you are running gcc X.Y.*.
333 # This is used to tweak build flags for gcc 4.4. 337 # This is used to tweak build flags for gcc 4.4.
334 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)', 338 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
335 # Figure out the python architecture to decide if we build pyauto. 339 # Figure out the python architecture to decide if we build pyauto.
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 'use_cups%': 0, 412 'use_cups%': 0,
409 }], 413 }],
410 # Set the relative path from this file to the GYP file of the JPEG 414 # Set the relative path from this file to the GYP file of the JPEG
411 # library used by Chromium. 415 # library used by Chromium.
412 ['use_libjpeg_turbo==1', { 416 ['use_libjpeg_turbo==1', {
413 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp', 417 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
414 }, { 418 }, {
415 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp', 419 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
416 }], # use_libjpeg_turbo==1 420 }], # use_libjpeg_turbo==1
417 ], 421 ],
418
419 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
420 # so Cocoa is happy (http://crbug.com/20441).
421 'locales': [
422 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
423 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
424 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
425 'ml', 'mr', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
426 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
427 'vi', 'zh-CN', 'zh-TW',
428 ],
429 }, 422 },
430 'target_defaults': { 423 'target_defaults': {
431 'variables': { 424 'variables': {
432 # The condition that operates on chromium_code is in a target_conditions 425 # The condition that operates on chromium_code is in a target_conditions
433 # section, and will not have access to the default fallback value of 426 # section, and will not have access to the default fallback value of
434 # chromium_code at the top of this file, or to the chromium_code 427 # chromium_code at the top of this file, or to the chromium_code
435 # variable placed at the root variables scope of .gyp files, because 428 # variable placed at the root variables scope of .gyp files, because
436 # those variables are not set at target scope. As a workaround, 429 # those variables are not set at target scope. As a workaround,
437 # if chromium_code is not set at target scope, define it in target scope 430 # if chromium_code is not set at target scope, define it in target scope
438 # to contain whatever value it has during early variable expansion. 431 # to contain whatever value it has during early variable expansion.
(...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after
1471 # and therefore SYMROOT, needs to be set at the project level. 1464 # and therefore SYMROOT, needs to be set at the project level.
1472 'SYMROOT': '<(DEPTH)/xcodebuild', 1465 'SYMROOT': '<(DEPTH)/xcodebuild',
1473 }, 1466 },
1474 } 1467 }
1475 1468
1476 # Local Variables: 1469 # Local Variables:
1477 # tab-width:2 1470 # tab-width:2
1478 # indent-tabs-mode:nil 1471 # indent-tabs-mode:nil
1479 # End: 1472 # End:
1480 # vim: set expandtab tabstop=2 shiftwidth=2: 1473 # vim: set expandtab tabstop=2 shiftwidth=2:
OLDNEW
« 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