OLD | NEW |
---|---|
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': { | 9 'variables': { |
10 # .gyp files or targets should set chromium_code to 1 if they build | 10 # .gyp files or targets should set chromium_code to 1 if they build |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
48 '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/a rm.*/arm/")', | 48 '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/a rm.*/arm/")', |
49 }, { # OS!="linux" | 49 }, { # OS!="linux" |
50 'host_arch%': 'ia32', | 50 'host_arch%': 'ia32', |
51 }], | 51 }], |
52 ], | 52 ], |
53 | 53 |
54 # Whether we're building a ChromeOS build. We set the initial | 54 # Whether we're building a ChromeOS build. We set the initial |
55 # value at this level of nesting so it's available for the | 55 # value at this level of nesting so it's available for the |
56 # toolkit_views test below. | 56 # toolkit_views test below. |
57 'chromeos%': '0', | 57 'chromeos%': '0', |
58 | |
59 # To do a shared build on linux we need to be able to choose between | |
60 # type static_library and shared_library. We default to doing a static | |
61 # build but you can override this with "gyp -Dlibrary=shared_library" | |
62 # or you can add the following line (without the #) to | |
63 # ~/.gyp/include.gypi {'variables': {'library': 'shared_library'}} | |
64 # to compile as shared by default | |
65 'library%': 'static_library', | |
58 }, | 66 }, |
59 | 67 |
60 # Set default value of toolkit_views on for Windows and Chrome OS. | 68 # Set default value of toolkit_views on for Windows and Chrome OS. |
61 # We set it at this level of nesting so the value is available for | 69 # We set it at this level of nesting so the value is available for |
62 # other conditionals below. | 70 # other conditionals below. |
63 'conditions': [ | 71 'conditions': [ |
64 ['OS=="win" or chromeos==1', { | 72 ['OS=="win" or chromeos==1', { |
65 'toolkit_views%': 1, | 73 'toolkit_views%': 1, |
66 }, { | 74 }, { |
67 'toolkit_views%': 0, | 75 'toolkit_views%': 0, |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
107 'arm_neon%': 1, | 115 'arm_neon%': 1, |
108 | 116 |
109 # The system root for cross-compiles. Default: none. | 117 # The system root for cross-compiles. Default: none. |
110 'sysroot%': '', | 118 'sysroot%': '', |
111 | 119 |
112 # On Linux, we build with sse2 for Chromium builds. | 120 # On Linux, we build with sse2 for Chromium builds. |
113 'disable_sse2%': 0, | 121 'disable_sse2%': 0, |
114 | 122 |
115 # Remoting compilation is enabled by default. Set to 0 to disable. | 123 # Remoting compilation is enabled by default. Set to 0 to disable. |
116 'remoting%': 1, | 124 'remoting%': 1, |
125 | |
126 'library%': '<(library)', | |
127 | |
128 # Variable 'component' is for cases where we would like to build some | |
129 # components as dynamic shared libraries but still need variable | |
130 # 'library' for static libraries. | |
131 # By default, component is set to whatever library is set to and | |
132 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi. | |
133 'component%': '<(library)', | |
117 }, | 134 }, |
118 | 135 |
119 # Define branding and buildtype on the basis of their settings within the | 136 # Define branding and buildtype on the basis of their settings within the |
120 # variables sub-dict above, unless overridden. | 137 # variables sub-dict above, unless overridden. |
121 'branding%': '<(branding)', | 138 'branding%': '<(branding)', |
122 'buildtype%': '<(buildtype)', | 139 'buildtype%': '<(buildtype)', |
123 'target_arch%': '<(target_arch)', | 140 'target_arch%': '<(target_arch)', |
124 'host_arch%': '<(host_arch)', | 141 'host_arch%': '<(host_arch)', |
125 'toolkit_views%': '<(toolkit_views)', | 142 'toolkit_views%': '<(toolkit_views)', |
126 'chromeos%': '<(chromeos)', | 143 'chromeos%': '<(chromeos)', |
127 'inside_chromium_build%': '<(inside_chromium_build)', | 144 'inside_chromium_build%': '<(inside_chromium_build)', |
128 'fastbuild%': '<(fastbuild)', | 145 'fastbuild%': '<(fastbuild)', |
129 'linux_fpic%': '<(linux_fpic)', | 146 'linux_fpic%': '<(linux_fpic)', |
130 'python_ver%': '<(python_ver)', | 147 'python_ver%': '<(python_ver)', |
131 'armv7%': '<(armv7)', | 148 'armv7%': '<(armv7)', |
132 'arm_neon%': '<(arm_neon)', | 149 'arm_neon%': '<(arm_neon)', |
133 'sysroot%': '<(sysroot)', | 150 'sysroot%': '<(sysroot)', |
134 'disable_sse2%': '<(disable_sse2)', | 151 'disable_sse2%': '<(disable_sse2)', |
135 'remoting%': '<(remoting)', | 152 'remoting%': '<(remoting)', |
153 'library%': '<(library)', | |
154 'component%': '<(component)', | |
136 | 155 |
137 # The release channel that this build targets. This is used to restrict | 156 # The release channel that this build targets. This is used to restrict |
138 # channel-specific build options, like which installer packages to create. | 157 # channel-specific build options, like which installer packages to create. |
139 # The default is 'all', which does no channel-specific filtering. | 158 # The default is 'all', which does no channel-specific filtering. |
140 'channel%': 'all', | 159 'channel%': 'all', |
141 | 160 |
142 # Override chromium_mac_pch and set it to 0 to suppress the use of | 161 # Override chromium_mac_pch and set it to 0 to suppress the use of |
143 # precompiled headers on the Mac. Prefix header injection may still be | 162 # precompiled headers on the Mac. Prefix header injection may still be |
144 # used, but prefix headers will not be precompiled. This is useful when | 163 # used, but prefix headers will not be precompiled. This is useful when |
145 # using distcc to distribute a build to compile slaves that don't | 164 # using distcc to distribute a build to compile slaves that don't |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
179 # Overridable specification for potential use of alternative | 198 # Overridable specification for potential use of alternative |
180 # JavaScript engines. | 199 # JavaScript engines. |
181 'javascript_engine%': 'v8', | 200 'javascript_engine%': 'v8', |
182 | 201 |
183 # Although base/allocator lets you select a heap library via an | 202 # Although base/allocator lets you select a heap library via an |
184 # environment variable, the libcmt shim it uses sometimes gets in | 203 # environment variable, the libcmt shim it uses sometimes gets in |
185 # the way. To disable it entirely, and switch to normal msvcrt, do e.g. | 204 # the way. To disable it entirely, and switch to normal msvcrt, do e.g. |
186 # 'win_use_allocator_shim': 0, | 205 # 'win_use_allocator_shim': 0, |
187 # 'win_release_RuntimeLibrary': 2 | 206 # 'win_release_RuntimeLibrary': 2 |
188 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build. | 207 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build. |
189 'win_use_allocator_shim%': 1, # 0 = shim allocator via libcmt; 1 = msvcrt | 208 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt |
190 | |
191 # To do a shared build on linux we need to be able to choose between type | |
192 # static_library and shared_library. We default to doing a static build | |
193 # but you can override this with "gyp -Dlibrary=shared_library" or you | |
194 # can add the following line (without the #) to ~/.gyp/include.gypi | |
195 # {'variables': {'library': 'shared_library'}} | |
196 # to compile as shared by default | |
197 'library%': 'static_library', | |
198 | 209 |
199 # Whether usage of OpenMAX is enabled. | 210 # Whether usage of OpenMAX is enabled. |
200 'enable_openmax%': 0, | 211 'enable_openmax%': 0, |
201 | 212 |
202 # Whether proprietary audio/video codecs are assumed to be included with | 213 # Whether proprietary audio/video codecs are assumed to be included with |
203 # this build (only meaningful if branding!=Chrome). | 214 # this build (only meaningful if branding!=Chrome). |
204 'proprietary_codecs%': 0, | 215 'proprietary_codecs%': 0, |
205 | 216 |
206 # TODO(bradnelson): eliminate this when possible. | 217 # TODO(bradnelson): eliminate this when possible. |
207 # To allow local gyp files to prevent release.vsprops from being included. | 218 # To allow local gyp files to prevent release.vsprops from being included. |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
323 'mac_breakpad%': 0, | 334 'mac_breakpad%': 0, |
324 'mac_keystone%': 0, | 335 'mac_keystone%': 0, |
325 }], | 336 }], |
326 ], | 337 ], |
327 }], # OS=="mac" | 338 }], # OS=="mac" |
328 # Whether to use multiple cores to compile with visual studio. This is | 339 # Whether to use multiple cores to compile with visual studio. This is |
329 # optional because it sometimes causes corruption on VS 2005. | 340 # optional because it sometimes causes corruption on VS 2005. |
330 # It is on by default on VS 2008 and off on VS 2005. | 341 # It is on by default on VS 2008 and off on VS 2005. |
331 ['OS=="win"', { | 342 ['OS=="win"', { |
332 'conditions': [ | 343 'conditions': [ |
344 ['component=="shared_library"', { | |
345 'win_use_allocator_shim%': 0, | |
346 }], | |
347 | |
333 ['MSVS_VERSION=="2005"', { | 348 ['MSVS_VERSION=="2005"', { |
334 'msvs_multi_core_compile%': 0, | 349 'msvs_multi_core_compile%': 0, |
335 },{ | 350 },{ |
336 'msvs_multi_core_compile%': 1, | 351 'msvs_multi_core_compile%': 1, |
337 }], | 352 }], |
338 # Don't do incremental linking for large modules on 32-bit. | 353 # Don't do incremental linking for large modules on 32-bit. |
339 ['MSVS_OS_BITS==32', { | 354 ['MSVS_OS_BITS==32', { |
340 'msvs_large_module_debug_link_mode%': '1', # No | 355 'msvs_large_module_debug_link_mode%': '1', # No |
341 },{ | 356 },{ |
342 'msvs_large_module_debug_link_mode%': '2', # Yes | 357 'msvs_large_module_debug_link_mode%': '2', # Yes |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
382 # That's enough to make it available during target conditional | 397 # That's enough to make it available during target conditional |
383 # processing. | 398 # processing. |
384 'chromium_code%': '<(chromium_code)', | 399 'chromium_code%': '<(chromium_code)', |
385 | 400 |
386 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html | 401 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html |
387 'mac_release_optimization%': '3', # Use -O3 unless overridden | 402 'mac_release_optimization%': '3', # Use -O3 unless overridden |
388 'mac_debug_optimization%': '0', # Use -O0 unless overridden | 403 'mac_debug_optimization%': '0', # Use -O0 unless overridden |
389 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx | 404 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx |
390 'win_release_Optimization%': '2', # 2 = /Os | 405 'win_release_Optimization%': '2', # 2 = /Os |
391 'win_debug_Optimization%': '0', # 0 = /Od | 406 'win_debug_Optimization%': '0', # 0 = /Od |
392 # See http://msdn.microsoft.com/en-us/library/aa652367(VS.71).aspx | |
393 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static) | |
394 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static) | |
395 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx | 407 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx |
396 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off | 408 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off |
397 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx | 409 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx |
398 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off, | 410 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off, |
399 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max | 411 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max |
400 | 412 |
401 'release_extra_cflags%': '', | 413 'release_extra_cflags%': '', |
402 'debug_extra_cflags%': '', | 414 'debug_extra_cflags%': '', |
403 'release_valgrind_build%': 0, | 415 'release_valgrind_build%': 0, |
416 | |
417 'conditions': [ | |
418 ['OS=="win" and component=="shared_library"', { | |
419 'win_release_RuntimeLibrary%': '2', # 2 = /MT (nondebug DLL) | |
420 'win_debug_RuntimeLibrary%': '3', # 3 = /MTd (debug DLL) | |
421 }, { | |
422 # See http://msdn.microsoft.com/en-us/library/aa652367(VS.71).aspx | |
M-A Ruel
2010/06/21 17:27:32
http://msdn.microsoft.com/en-us/library/aa652367.a
| |
423 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static) | |
424 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static) | |
425 }], | |
426 ], | |
404 }, | 427 }, |
405 'conditions': [ | 428 'conditions': [ |
406 ['branding=="Chrome"', { | 429 ['branding=="Chrome"', { |
407 'defines': ['GOOGLE_CHROME_BUILD'], | 430 'defines': ['GOOGLE_CHROME_BUILD'], |
408 }, { # else: branding!="Chrome" | 431 }, { # else: branding!="Chrome" |
409 'defines': ['CHROMIUM_BUILD'], | 432 'defines': ['CHROMIUM_BUILD'], |
410 }], | 433 }], |
411 ['toolkit_views==1', { | 434 ['toolkit_views==1', { |
412 'defines': ['TOOLKIT_VIEWS=1'], | 435 'defines': ['TOOLKIT_VIEWS=1'], |
413 }], | 436 }], |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
709 }, | 732 }, |
710 'conditions': [ | 733 'conditions': [ |
711 ['release_valgrind_build==0', { | 734 ['release_valgrind_build==0', { |
712 'defines': ['NVALGRIND', 'DYNAMIC_ANNOTATIONS_ENABLED=0'], | 735 'defines': ['NVALGRIND', 'DYNAMIC_ANNOTATIONS_ENABLED=0'], |
713 }, { | 736 }, { |
714 'defines': ['DYNAMIC_ANNOTATIONS_ENABLED=1'], | 737 'defines': ['DYNAMIC_ANNOTATIONS_ENABLED=1'], |
715 }], | 738 }], |
716 ['win_use_allocator_shim==0', { | 739 ['win_use_allocator_shim==0', { |
717 'defines': ['NO_TCMALLOC'], | 740 'defines': ['NO_TCMALLOC'], |
718 }], | 741 }], |
719 ['win_release_RuntimeLibrary==2', { | |
720 # Visual C++ 2008 barfs when building anything with /MD (msvcrt): | |
721 # VC\include\typeinfo(139) : warning C4275: non dll-interface | |
722 # class 'stdext::exception' used as base for dll-interface | |
723 # class 'std::bad_cast' | |
724 'msvs_disabled_warnings': [4275], | |
725 }], | |
726 ['OS=="linux"', { | 742 ['OS=="linux"', { |
727 'cflags': [ | 743 'cflags': [ |
728 '<@(release_extra_cflags)', | 744 '<@(release_extra_cflags)', |
729 ], | 745 ], |
730 }], | 746 }], |
731 ], | 747 ], |
732 }, | 748 }, |
733 'Purify_Base': { | 749 'Purify_Base': { |
734 'abstract': 1, | 750 'abstract': 1, |
735 'defines': [ | 751 'defines': [ |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1218 ], # target_conditions | 1234 ], # target_conditions |
1219 }, # target_defaults | 1235 }, # target_defaults |
1220 }], # OS=="mac" | 1236 }], # OS=="mac" |
1221 ['OS=="win"', { | 1237 ['OS=="win"', { |
1222 'target_defaults': { | 1238 'target_defaults': { |
1223 'defines': [ | 1239 'defines': [ |
1224 '_WIN32_WINNT=0x0600', | 1240 '_WIN32_WINNT=0x0600', |
1225 'WINVER=0x0600', | 1241 'WINVER=0x0600', |
1226 'WIN32', | 1242 'WIN32', |
1227 '_WINDOWS', | 1243 '_WINDOWS', |
1228 '_HAS_EXCEPTIONS=0', | |
1229 'NOMINMAX', | 1244 'NOMINMAX', |
1230 '_CRT_RAND_S', | 1245 '_CRT_RAND_S', |
1231 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS', | 1246 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS', |
1232 'WIN32_LEAN_AND_MEAN', | 1247 'WIN32_LEAN_AND_MEAN', |
1233 '_SECURE_ATL', | 1248 '_SECURE_ATL', |
1234 '_HAS_TR1=0', | 1249 '_HAS_TR1=0', |
1235 ], | 1250 ], |
1251 'conditions': [ | |
1252 ['component=="static_library"', { | |
1253 'defines': [ | |
1254 '_HAS_EXCEPTIONS=0', | |
1255 ], | |
1256 }], | |
1257 ], | |
1258 | |
1236 'msvs_system_include_dirs': [ | 1259 'msvs_system_include_dirs': [ |
1237 '<(DEPTH)/third_party/platformsdk_win7/files/Include', | 1260 '<(DEPTH)/third_party/platformsdk_win7/files/Include', |
1238 '<(DEPTH)/third_party/directxsdk/files/Include', | 1261 '<(DEPTH)/third_party/directxsdk/files/Include', |
1239 '$(VSInstallDir)/VC/atlmfc/include', | 1262 '$(VSInstallDir)/VC/atlmfc/include', |
1240 ], | 1263 ], |
1241 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'], | 1264 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'], |
1242 'msvs_disabled_warnings': [4396, 4503, 4819], | 1265 'msvs_disabled_warnings': [4396, 4503, 4819], |
1243 'msvs_settings': { | 1266 'msvs_settings': { |
1244 'VCCLCompilerTool': { | 1267 'VCCLCompilerTool': { |
1245 'MinimalRebuild': 'false', | 1268 'MinimalRebuild': 'false', |
1246 'ExceptionHandling': '0', | |
1247 'BufferSecurityCheck': 'true', | 1269 'BufferSecurityCheck': 'true', |
1248 'EnableFunctionLevelLinking': 'true', | 1270 'EnableFunctionLevelLinking': 'true', |
1249 'RuntimeTypeInfo': 'false', | 1271 'RuntimeTypeInfo': 'false', |
1250 'WarningLevel': '3', | 1272 'WarningLevel': '3', |
1251 'WarnAsError': 'true', | 1273 'WarnAsError': 'true', |
1252 'DebugInformationFormat': '3', | 1274 'DebugInformationFormat': '3', |
1253 'conditions': [ | 1275 'conditions': [ |
1254 [ 'msvs_multi_core_compile', { | 1276 [ 'msvs_multi_core_compile', { |
1255 'AdditionalOptions': ['/MP'], | 1277 'AdditionalOptions': ['/MP'], |
1256 }], | 1278 }], |
1279 | |
1280 ['component=="shared_library"', { | |
1281 'ExceptionHandling': '1', # /EHsc | |
1282 }, { | |
1283 'ExceptionHandling': '0', | |
1284 }], | |
1257 ], | 1285 ], |
1258 }, | 1286 }, |
1259 'VCLibrarianTool': { | 1287 'VCLibrarianTool': { |
1260 'AdditionalOptions': ['/ignore:4221'], | 1288 'AdditionalOptions': ['/ignore:4221'], |
1261 'AdditionalLibraryDirectories': [ | 1289 'AdditionalLibraryDirectories': [ |
1262 '<(DEPTH)/third_party/platformsdk_win7/files/Lib', | 1290 '<(DEPTH)/third_party/platformsdk_win7/files/Lib', |
1263 '<(DEPTH)/third_party/directxsdk/files/Lib/x86', | 1291 '<(DEPTH)/third_party/directxsdk/files/Lib/x86', |
1264 ], | 1292 ], |
1265 }, | 1293 }, |
1266 'VCLinkerTool': { | 1294 'VCLinkerTool': { |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1393 # and therefore SYMROOT, needs to be set at the project level. | 1421 # and therefore SYMROOT, needs to be set at the project level. |
1394 'SYMROOT': '<(DEPTH)/xcodebuild', | 1422 'SYMROOT': '<(DEPTH)/xcodebuild', |
1395 }, | 1423 }, |
1396 } | 1424 } |
1397 | 1425 |
1398 # Local Variables: | 1426 # Local Variables: |
1399 # tab-width:2 | 1427 # tab-width:2 |
1400 # indent-tabs-mode:nil | 1428 # indent-tabs-mode:nil |
1401 # End: | 1429 # End: |
1402 # vim: set expandtab tabstop=2 shiftwidth=2: | 1430 # vim: set expandtab tabstop=2 shiftwidth=2: |
OLD | NEW |