blob: c19713b2d8f5103517dc91237a383f74e42c72f1 [file] [log] [blame]
[email protected]2f80c312009-02-25 21:26:551# Copyright (c) 2009 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5{
6 'variables': {
[email protected]b3fb8092009-03-12 19:09:247 # .gyp files should set chromium_code to 1 if they build Chromium-specific
8 # code, as opposed to external code. This variable is used to control
9 # such things as the set of warnings to enable, and whether warnings are
10 # treated as errors.
[email protected]2f80c312009-02-25 21:26:5511 'chromium_code%': 0,
[email protected]b3fb8092009-03-12 19:09:2412
13 # Variables expected to be overriden on the GYP command line (-D) or by
14 # ~/.gyp/include.gypi.
15
16 # Override chromium_mac_pch and set it to 0 to suppress the use of
17 # precompiled headers on the Mac. Prefix header injection may still be
18 # used, but prefix headers will not be precompiled. This is useful when
19 # using distcc to distribute a build to compile slaves that don't
20 # share the same compiler executable as the system driving the compilation,
21 # because precompiled headers rely on pointers into a specific compiler
22 # executable's image. Setting this to 0 is needed to use an experimental
23 # Linux-Mac cross compiler distcc farm.
24 'chromium_mac_pch%': 1,
25
26 # Override branding to select the desired branding flavor.
[email protected]32aa8cc2009-03-04 21:36:3927 'branding%': 'Chromium',
[email protected]f5ecbba12009-04-03 04:35:1828
[email protected]569a2742009-06-25 20:50:3029 # Override buildtype to select the desired build flavor.
30 # Dev - everyday build for development/testing
31 # Official - release build (generally implies additional processing)
32 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
33 # conversion is done), some of the things which are now controlled by
34 # 'branding', such as symbol generation, will need to be refactored based
35 # on 'buildtype' (i.e. we don't care about saving symbols for non-Official
36 # builds).
37 'buildtype%': 'Dev',
38
[email protected]f5ecbba12009-04-03 04:35:1839 # Set to 1 to enable code coverage. In addition to build changes
40 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
41 # project file called "coverage".
42 # Currently ignored on Windows.
43 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:4944
[email protected]c61f6432009-04-22 01:16:4245 # Overridable specification for potential use of alternative
46 # JavaScript engines.
47 'javascript_engine%': 'v8',
48
[email protected]653bd5f032009-04-08 12:55:4949 # To do a shared build on linux we need to be able to choose between type
50 # static_library and shared_library. We default to doing a static build
51 # but you can override this with "gyp -Dlibrary=shared_library" or you
52 # can add the following line (without the #) to ~/.gyp/include.gypi
53 # {'variables': {'library': 'shared_library'}}
54 # to compile as shared by default
55 'library%': 'static_library',
[email protected]e5b2eaa2009-04-14 01:39:1256
57 # TODO(bradnelson): eliminate this when possible.
58 # To allow local gyp files to prevent release.vsprops from being included.
59 # Yes(1) means include release.vsprops.
60 # Once all vsprops settings are migrated into gyp, this can go away.
61 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:2362
[email protected]48c7af72009-07-03 22:00:1963 # TODO(bradnelson): eliminate this when possible.
64 # To allow local gyp files to override additional linker options for msvs.
65 # Yes(1) means set use the common linker options.
66 'msvs_use_common_linker_extras%': 1,
67
[email protected]1ffb6502009-06-02 07:46:2468 # TODO(sgk): eliminate this if possible.
69 # It would be nicer to support this via a setting in 'target_defaults'
70 # in chrome/app/locales/locales.gypi overriding the setting in the
71 # 'Debug' configuration in the 'target_defaults' dict below,
72 # but that doesn't work as we'd like.
73 'msvs_debug_link_incremental%': '2',
74
[email protected]606116d22009-05-06 22:38:2375 # The architecture that we're building on.
76 'target_arch%': 'ia32',
[email protected]e6970232009-05-12 23:51:1777
78 # By default linux does not use views. To turn on views in Linux
79 # set the variable GYP_DEFINES to "toolkit_views=1", or modify
80 # ~/.gyp/include.gypi .
81 'toolkit_views%': 0,
[email protected]2b883b92009-06-02 22:57:5082
[email protected]16779842009-07-08 23:45:2983 'chromeos%': 0,
[email protected]397fe9d2009-06-30 00:02:2784
[email protected]b66b7bd2009-06-11 20:16:1085 'chrome_personalization%': 0,
[email protected]214d0fd2009-07-15 01:41:5086
87 # Set the restrictions on the SUID sandbox binary.
88 # Path: only exec the hard coded chrome binary path
89 # User: only exec binaries owned by the running user.
90 #
91 # Developers should read
92 # http://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment
[email protected]573136142009-07-15 22:48:3793 'linux_suid_sandbox_restrictions%': 'Path',
94
95 # This is the location of the sandbox binary. Chrome looks for this before
96 # running the zygote process. If found, and SUID, it will be used to
97 # sandbox the zygote process and, thus, all renderer processes.
98 'linux_sandbox_path%': '',
99
100 # If |linux_suid_sandbox_restrictions|, above, is 'Path' then only a single
101 # path is allowed to be exec'ed by the sandbox for security reasons. That
102 # path is set here. It should be the final location of the Chromium binary
103 # on the system.
104 'linux_sandbox_chrome_path%': '/opt/google/chrome/chrome',
[email protected]2f80c312009-02-25 21:26:55105 },
106 'target_defaults': {
[email protected]32aa8cc2009-03-04 21:36:39107 'conditions': [
108 ['branding=="Chrome"', {
109 'defines': ['GOOGLE_CHROME_BUILD'],
[email protected]f70085e42009-05-28 20:31:48110 'conditions': [
111 ['OS=="linux"', {
112 'cflags': [ '-gstabs' ],
113 }],
114 ],
[email protected]32aa8cc2009-03-04 21:36:39115 }, { # else: branding!="Chrome"
116 'defines': ['CHROMIUM_BUILD'],
117 }],
[email protected]6cb1cec2009-05-15 03:05:20118 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:17119 'defines': ['TOOLKIT_VIEWS=1'],
120 }],
[email protected]16779842009-07-08 23:45:29121 ['chromeos==1', {
122 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:50123 }],
[email protected]b66b7bd2009-06-11 20:16:10124 ['chrome_personalization==1', {
125 'defines': ['CHROME_PERSONALIZATION=1'],
126 }],
[email protected]f5ecbba12009-04-03 04:35:18127 ['coverage!=0', {
128 'conditions': [
129 ['OS=="mac"', {
130 'xcode_settings': {
131 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES',
132 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES',
[email protected]5ae4f55e2009-04-13 23:19:47133 },
[email protected]f5ecbba12009-04-03 04:35:18134 # Add -lgcov for executables, not for static_libraries.
135 # This is a delayed conditional.
136 'target_conditions': [
137 ['_type=="executable"', {
138 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:47139 }],
140 ],
141 }],
[email protected]7122ffd52009-04-30 23:19:00142 # Linux gyp (into scons) doesn't like target_conditions?
143 # TODO(???): track down why 'target_conditions' doesn't work
144 # on Linux gyp into scons like it does on Mac gyp into xcodeproj.
[email protected]f5ecbba12009-04-03 04:35:18145 ['OS=="linux"', {
146 'cflags': [ '-ftest-coverage',
147 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:00148 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:18149 }],
[email protected]e8f6ff42009-07-07 18:20:53150 # Finally, for Windows, we simply turn on profiling.
151 ['OS=="win"', {
152 'msvs_settings': {
153 'VCLinkerTool': {
154 'Profile': 'true',
155 },
156 'VCCLCompilerTool': {
157 # /Z7, not /Zi, so coverage is happyb
158 'DebugInformationFormat': '1',
159 'AdditionalOptions': '/Yd',
160 }
161 }
162 }], # OS==win
163 ], # conditions for coverage
164 }], # coverage!=0
165 ], # conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:55166 'default_configuration': 'Debug',
167 'configurations': {
[email protected]825ff8d2009-05-22 01:40:48168 # VCLinkerTool LinkIncremental values below:
169 # 0 == default
170 # 1 == /INCREMENTAL:NO
171 # 2 == /INCREMENTAL
172 # Debug links incremental, Release does not.
[email protected]2f80c312009-02-25 21:26:55173 'Debug': {
174 'conditions': [
175 [ 'OS=="mac"', {
176 'xcode_settings': {
177 'COPY_PHASE_STRIP': 'NO',
178 'GCC_OPTIMIZATION_LEVEL': '0',
179 }
180 }],
181 [ 'OS=="win"', {
182 'configuration_platform': 'Win32',
183 'msvs_configuration_attributes': {
184 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)',
185 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
186 'CharacterSet': '1',
187 },
188 'msvs_settings': {
189 'VCCLCompilerTool': {
190 'Optimization': '0',
191 'PreprocessorDefinitions': ['_DEBUG'],
192 'BasicRuntimeChecks': '3',
193 'RuntimeLibrary': '1',
194 },
195 'VCLinkerTool': {
[email protected]1ffb6502009-06-02 07:46:24196 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]2f80c312009-02-25 21:26:55197 },
198 'VCResourceCompilerTool': {
199 'PreprocessorDefinitions': ['_DEBUG'],
200 },
201 },
202 }],
203 ],
204 },
205 'Release': {
206 'defines': [
207 'NDEBUG',
208 ],
209 'conditions': [
210 [ 'OS=="mac"', {
211 'xcode_settings': {
212 'DEAD_CODE_STRIPPING': 'YES',
[email protected]64eba222009-07-14 18:43:42213 'conditions': [
214 ['mac_release_optimization != "UNSET"',
215 {'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)'}],
216 ],
[email protected]2f80c312009-02-25 21:26:55217 }
218 }],
[email protected]e5b2eaa2009-04-14 01:39:12219 [ 'OS=="win" and msvs_use_common_release', {
[email protected]2f80c312009-02-25 21:26:55220 'configuration_platform': 'Win32',
221 'msvs_props': ['release.vsprops'],
222 }],
[email protected]825ff8d2009-05-22 01:40:48223 [ 'OS=="win"', {
224 'msvs_settings': {
225 'VCLinkerTool': {
226 'LinkIncremental': '1',
227 },
228 },
229 }],
[email protected]2f80c312009-02-25 21:26:55230 ],
231 },
232 },
233 },
234 'conditions': [
[email protected]606116d22009-05-06 22:38:23235 ['OS=="linux"', {
[email protected]9d384032009-03-20 23:13:26236 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:27237 # Enable -Werror by default, but put it in a variable so it can
238 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
239 'variables': {
240 'werror%': '-Werror',
241 },
[email protected]9d384032009-03-20 23:13:26242 'cflags': [
[email protected]606116d22009-05-06 22:38:23243 '<(werror)', # See note above about the werror variable.
244 '-pthread',
[email protected]9d384032009-03-20 23:13:26245 ],
[email protected]a6cf87e2009-04-03 04:07:38246 'ldflags': [
[email protected]9d384032009-03-20 23:13:26247 '-pthread',
248 ],
[email protected]b5e46b92009-03-26 18:58:10249 'scons_variable_settings': {
250 'LIBPATH': ['$LIB_DIR'],
[email protected]9d384032009-03-20 23:13:26251 # Linking of large files uses lots of RAM, so serialize links
252 # using the handy flock command from util-linux.
[email protected]c13fcbd2009-03-27 04:27:01253 'FLOCK_LINK': ['flock', '$TOP_BUILDDIR/linker.lock', '$LINK'],
[email protected]789fbb7c2009-04-02 16:20:31254 'FLOCK_SHLINK': ['flock', '$TOP_BUILDDIR/linker.lock', '$SHLINK'],
255 'FLOCK_LDMODULE': ['flock', '$TOP_BUILDDIR/linker.lock', '$LDMODULE'],
[email protected]9d384032009-03-20 23:13:26256
257 # We have several cases where archives depend on each other in
258 # a cyclic fashion. Since the GNU linker does only a single
259 # pass over the archives we surround the libraries with
260 # --start-group and --end-group (aka -( and -) ). That causes
261 # ld to loop over the group until no more undefined symbols
262 # are found. In an ideal world we would only make groups from
263 # those libraries which we knew to be in cycles. However,
264 # that's tough with SCons, so we bodge it by making all the
265 # archives a group by redefining the linking command here.
266 #
267 # TODO: investigate whether we still have cycles that
268 # require --{start,end}-group. There has been a lot of
269 # refactoring since this was first coded, which might have
270 # eliminated the circular dependencies.
[email protected]12862922009-04-20 21:36:41271 #
272 # Note: $_LIBDIRFLAGS comes before ${LINK,SHLINK,LDMODULE}FLAGS
273 # so that we prefer our own built libraries (e.g. -lpng) to
274 # system versions of libraries that pkg-config might turn up.
275 # TODO(sgk): investigate handling this not by re-ordering the
276 # flags this way, but by adding a hook to use the SCons
277 # ParseFlags() option on the output from pkg-config.
278 'LINKCOM': [['$FLOCK_LINK', '-o', '$TARGET', '$_LIBDIRFLAGS', '$LINKFLAGS', '$SOURCES', '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']],
279 'SHLINKCOM': [['$FLOCK_SHLINK', '-o', '$TARGET', '$_LIBDIRFLAGS', '$SHLINKFLAGS', '$SOURCES', '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']],
280 'LDMODULECOM': [['$FLOCK_LDMODULE', '-o', '$TARGET', '$_LIBDIRFLAGS', '$LDMODULEFLAGS', '$SOURCES', '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']],
[email protected]9d384032009-03-20 23:13:26281 'IMPLICIT_COMMAND_DEPENDENCIES': 0,
[email protected]d0644282009-04-22 00:20:29282 # -rpath is only used when building with shared libraries.
283 'conditions': [
284 [ 'library=="shared_library"', {
285 'RPATH': '$LIB_DIR',
286 }],
287 ],
[email protected]9d384032009-03-20 23:13:26288 },
[email protected]b5e46b92009-03-26 18:58:10289 'scons_import_variables': [
[email protected]52049d5c2009-05-01 20:32:49290 'AS',
[email protected]b5e46b92009-03-26 18:58:10291 'CC',
292 'CXX',
293 'LINK',
294 ],
295 'scons_propagate_variables': [
[email protected]52049d5c2009-05-01 20:32:49296 'AS',
[email protected]b5e46b92009-03-26 18:58:10297 'CC',
298 'CCACHE_DIR',
299 'CXX',
300 'DISTCC_DIR',
301 'DISTCC_HOSTS',
302 'HOME',
[email protected]5ae4f55e2009-04-13 23:19:47303 'INCLUDE_SERVER_ARGS',
304 'INCLUDE_SERVER_PORT',
[email protected]b5e46b92009-03-26 18:58:10305 'LINK',
[email protected]fff920a2009-05-08 22:35:32306 'CHROME_BUILD_TYPE',
307 'CHROMIUM_BUILD',
308 'OFFICIAL_BUILD',
[email protected]b5e46b92009-03-26 18:58:10309 ],
[email protected]3aacaf952009-04-02 15:34:09310 'configurations': {
311 'Debug': {
[email protected]c5bdc032009-04-20 19:11:31312 'variables': {
313 'debug_optimize%': '0',
314 },
[email protected]3aacaf952009-04-02 15:34:09315 'defines': [
316 '_DEBUG',
317 ],
318 'cflags': [
[email protected]c5bdc032009-04-20 19:11:31319 '-O<(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:09320 '-g',
[email protected]9a5d2a52009-05-22 03:37:45321 # One can use '-gstabs' to enable building the debugging
322 # information in STABS format for breakpad's dumpsyms.
[email protected]3aacaf952009-04-02 15:34:09323 ],
[email protected]96fd0032009-04-24 00:13:08324 'ldflags': [
325 '-rdynamic', # Allows backtrace to resolve symbols.
326 ],
[email protected]5315f2842009-04-28 00:43:27327 },
[email protected]3aacaf952009-04-02 15:34:09328 'Release': {
329 'cflags': [
330 '-O2',
[email protected]d8cc3a62009-04-08 18:29:53331 # Don't emit the GCC version ident directives, they just end up
332 # in the .comment section taking up binary size.
333 '-fno-ident',
334 # Put data and code in their own sections, so that unused symbols
335 # can be removed at link time with --gc-sections.
336 '-fdata-sections',
337 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:09338 ],
339 },
340 },
[email protected]601b540222009-04-03 21:32:04341 'variants': {
342 'coverage': {
343 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
344 'ldflags': ['-fprofile-arcs'],
345 },
346 'profile': {
347 'cflags': ['-pg', '-g'],
348 'ldflags': ['-pg'],
349 },
350 'symbols': {
351 'cflags': ['-g'],
352 },
353 },
[email protected]606116d22009-05-06 22:38:23354 'conditions': [
355 [ 'target_arch=="arm"', {
356 'cflags': [
357 '-fno-exceptions',
358 '-Wall',
359 ],
[email protected]1c6560af2009-07-14 11:02:16360 'cflags_cc': [
361 '-fno-threadsafe-statics',
362 ],
[email protected]606116d22009-05-06 22:38:23363 }, { # else: target_arch != "arm"
364 'asflags': [
365 # Needed so that libs with .s files (e.g. libicudata.a)
366 # are compatible with the general 32-bit-ness.
367 '-32',
368 ],
369 # All floating-point computations on x87 happens in 80-bit
370 # precision. Because the C and C++ language standards allow
371 # the compiler to keep the floating-point values in higher
372 # precision than what's specified in the source and doing so
373 # is more efficient than constantly rounding up to 64-bit or
374 # 32-bit precision as specified in the source, the compiler,
375 # especially in the optimized mode, tries very hard to keep
376 # values in x87 floating-point stack (in 80-bit precision)
377 # as long as possible. This has important side effects, that
378 # the real value used in computation may change depending on
379 # how the compiler did the optimization - that is, the value
380 # kept in 80-bit is different than the value rounded down to
381 # 64-bit or 32-bit. There are possible compiler options to make
382 # this behavior consistent (e.g. -ffloat-store would keep all
383 # floating-values in the memory, thus force them to be rounded
384 # to its original precision) but they have significant runtime
385 # performance penalty.
386 #
387 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
388 # which keep floating-point values in SSE registers in its
389 # native precision (32-bit for single precision, and 64-bit for
390 # double precision values). This means the floating-point value
391 # used during computation does not change depending on how the
392 # compiler optimized the code, since the value is always kept
393 # in its specified precision.
[email protected]ffde7932009-05-29 00:39:06394 'conditions': [
395 ['branding=="Chromium"', {
396 'cflags': [
397 '-march=pentium4',
398 '-msse2',
399 '-mfpmath=sse',
400 ],
401 }],
402 ],
[email protected]606116d22009-05-06 22:38:23403 'cflags': [
404 '-m32',
[email protected]606116d22009-05-06 22:38:23405 '-fno-exceptions',
[email protected]606116d22009-05-06 22:38:23406 '-Wall',
407 ],
[email protected]1c6560af2009-07-14 11:02:16408 'cflags_cc': [
409 '-fno-threadsafe-statics',
410 ],
[email protected]606116d22009-05-06 22:38:23411 'ldflags': [
412 '-m32',
413 ],
414 }],
415 ],
[email protected]9d384032009-03-20 23:13:26416 },
417 }],
[email protected]2f80c312009-02-25 21:26:55418 ['OS=="mac"', {
419 'target_defaults': {
[email protected]24700642009-06-01 16:01:20420 'variables': {
421 # This should be 'mac_real_dsym%', but there seems to be a bug
422 # with % in variables that are intended to be set to different
423 # values in different targets, like this one.
424 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
[email protected]64eba222009-07-14 18:43:42425 # Release defaults to the Xcode optimization default, this var
426 # lets you force the value.
427 'mac_release_optimization%': 'UNSET'
[email protected]24700642009-06-01 16:01:20428 },
[email protected]d92c7c012009-03-19 19:26:42429 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:55430 'xcode_settings': {
431 'ALWAYS_SEARCH_USER_PATHS': 'NO',
432 'GCC_C_LANGUAGE_STANDARD': 'c99',
433 'GCC_CW_ASM_SYNTAX': 'NO',
[email protected]7cf57d172009-06-03 18:15:22434 'GCC_DYNAMIC_NO_PIC': 'NO',
[email protected]2f80c312009-02-25 21:26:55435 'GCC_ENABLE_PASCAL_STRINGS': 'NO',
436 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]793c3d72009-04-10 15:46:34437 'GCC_OBJC_CALL_CXX_CDTORS': 'YES',
[email protected]2f80c312009-02-25 21:26:55438 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES',
439 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES',
440 'GCC_VERSION': '4.2',
441 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES',
442 'MACOSX_DEPLOYMENT_TARGET': '10.5',
443 'PREBINDING': 'NO',
444 'SDKROOT': 'macosx10.5',
445 'USE_HEADERMAP': 'NO',
446 'WARNING_CFLAGS': ['-Wall', '-Wendif-labels'],
[email protected]b3fb8092009-03-12 19:09:24447 'conditions': [
448 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
449 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}],
450 ],
[email protected]2f80c312009-02-25 21:26:55451 },
452 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:55453 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:46454 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
455 }],
456 ['_mac_bundle', {
457 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:08458 }],
[email protected]d92c7c012009-03-19 19:26:42459 ['_type=="executable"', {
[email protected]24700642009-06-01 16:01:20460 'target_conditions': [
461 ['mac_real_dsym == 1', {
462 # To get a real .dSYM bundle produced by dsymutil, set the
463 # debug information format to dwarf-with-dsym. Since
464 # strip_from_xcode will not be used, set Xcode to do the
465 # stripping as well.
466 'configurations': {
467 'Release': {
468 'xcode_settings': {
469 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
470 'DEPLOYMENT_POSTPROCESSING': 'YES',
471 'STRIP_INSTALLED_PRODUCT': 'YES',
472 },
473 },
[email protected]2f80c312009-02-25 21:26:55474 },
[email protected]24700642009-06-01 16:01:20475 }, { # mac_real_dsym != 1
476 # To get a fast fake .dSYM bundle, use a post-build step to
477 # produce the .dSYM and strip the executable. strip_from_xcode
478 # only operates in the Release configuration.
479 'postbuilds': [
480 {
481 'variables': {
482 # Define strip_from_xcode in a variable ending in _path
483 # so that gyp understands it's a path and performs proper
484 # relativization during dict merging.
485 'strip_from_xcode_path': 'mac/strip_from_xcode',
486 },
487 'postbuild_name': 'Strip If Needed',
488 'action': ['<(strip_from_xcode_path)'],
489 },
490 ],
491 }],
[email protected]2f80c312009-02-25 21:26:55492 ],
493 }],
494 ],
495 },
496 }],
497 ['OS=="win"', {
498 'target_defaults': {
499 'defines': [
500 '_WIN32_WINNT=0x0600',
501 'WINVER=0x0600',
502 'WIN32',
503 '_WINDOWS',
504 '_HAS_EXCEPTIONS=0',
505 'NOMINMAX',
506 '_CRT_RAND_S',
507 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
508 'WIN32_LEAN_AND_MEAN',
509 '_SECURE_ATL',
[email protected]adfb98c2009-06-23 20:08:45510 '_HAS_TR1=0',
[email protected]2f80c312009-02-25 21:26:55511 ],
512 'include_dirs': [
513 '<(DEPTH)/third_party/platformsdk_win2008_6_1/files/Include',
514 '$(VSInstallDir)/VC/atlmfc/include',
515 ],
516 'msvs_cygwin_dirs': ['../third_party/cygwin'],
[email protected]6840561772009-05-12 16:37:55517 'msvs_disabled_warnings': [4396, 4503, 4819],
[email protected]2f80c312009-02-25 21:26:55518 'msvs_settings': {
519 'VCCLCompilerTool': {
520 'MinimalRebuild': 'false',
521 'ExceptionHandling': '0',
522 'BufferSecurityCheck': 'true',
523 'EnableFunctionLevelLinking': 'true',
524 'RuntimeTypeInfo': 'false',
525 'WarningLevel': '3',
526 'WarnAsError': 'true',
527 'DebugInformationFormat': '3',
528 },
529 'VCLibrarianTool': {
530 'AdditionalOptions': '/ignore:4221',
[email protected]2f80c312009-02-25 21:26:55531 'AdditionalLibraryDirectories':
[email protected]07506b502009-06-29 00:30:51532 ['<(DEPTH)/third_party/platformsdk_win2008_6_1/files/Lib'],
[email protected]2f80c312009-02-25 21:26:55533 },
534 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:55535 'AdditionalDependencies': [
536 'wininet.lib',
537 'version.lib',
538 'msimg32.lib',
539 'ws2_32.lib',
540 'usp10.lib',
541 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:08542 'dbghelp.lib',
[email protected]2f80c312009-02-25 21:26:55543 ],
544 'AdditionalLibraryDirectories':
[email protected]07506b502009-06-29 00:30:51545 ['<(DEPTH)/third_party/platformsdk_win2008_6_1/files/Lib'],
[email protected]2f80c312009-02-25 21:26:55546 'GenerateDebugInformation': 'true',
547 'MapFileName': '$(OutDir)\\$(TargetName).map',
548 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
549 'TargetMachine': '1',
550 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:48551 # SubSystem values:
552 # 0 == not set
553 # 1 == /SUBSYSTEM:CONSOLE
554 # 2 == /SUBSYSTEM:WINDOWS
555 # Most of the executables we'll ever create are tests
556 # and utilities with console output.
557 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:55558 },
559 'VCMIDLTool': {
560 'GenerateStublessProxies': 'true',
561 'TypeLibraryName': '$(InputName).tlb',
562 'OutputDirectory': '$(IntDir)',
563 'HeaderFileName': '$(InputName).h',
564 'DLLDataFileName': 'dlldata.c',
565 'InterfaceIdentifierFileName': '$(InputName)_i.c',
566 'ProxyFileName': '$(InputName)_p.c',
567 },
568 'VCResourceCompilerTool': {
569 'Culture' : '1033',
[email protected]245b3cd592009-03-31 01:12:14570 'AdditionalIncludeDirectories': ['<(DEPTH)'],
[email protected]2f80c312009-02-25 21:26:55571 },
572 },
573 },
574 }],
575 ['chromium_code==0', {
576 # This section must follow the other conditon sections above because
577 # external_code.gypi expects to be merged into those settings.
578 'includes': [
579 'external_code.gypi',
580 ],
[email protected]dce5df52009-06-29 17:58:25581 }, {
582 'target_defaults': {
583 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the
584 # C99 macros on Mac and Linux.
585 'defines': [
586 '__STDC_FORMAT_MACROS',
587 ],
588 },
[email protected]2f80c312009-02-25 21:26:55589 }],
[email protected]48c7af72009-07-03 22:00:19590 ['msvs_use_common_linker_extras', {
591 'target_defaults': {
592 'msvs_settings': {
593 'VCLinkerTool': {
594 'AdditionalOptions':
595 '/safeseh /dynamicbase /ignore:4199 /ignore:4221 /nxcompat',
596 'DelayLoadDLLs': [
597 'dbghelp.dll',
598 'dwmapi.dll',
599 'uxtheme.dll',
600 ],
601 },
602 },
603 },
604 }],
[email protected]2f80c312009-02-25 21:26:55605 ],
[email protected]c13fcbd2009-03-27 04:27:01606 'scons_settings': {
607 'sconsbuild_dir': '<(DEPTH)/sconsbuild',
608 },
[email protected]2f80c312009-02-25 21:26:55609 'xcode_settings': {
610 # The Xcode generator will look for an xcode_settings section at the root
611 # of each dict and use it to apply settings on a file-wide basis. Most
612 # settings should not be here, they should be in target-specific
613 # xcode_settings sections, or better yet, should use non-Xcode-specific
614 # settings in target dicts. SYMROOT is a special case, because many other
615 # Xcode variables depend on it, including variables such as
616 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
617 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
618 # files to appear (when present) in the UI as actual files and not red
619 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
620 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:16621 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:55622 },
623}