blob: cc3d2329ee0caeb9f1899809d3ccf8650c21784f [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]8a2fcba2009-07-29 00:52:24245 '-fno-exceptions',
246 '-Wall',
247 ],
248 'cflags_cc': [
249 '-fno-threadsafe-statics',
[email protected]9d384032009-03-20 23:13:26250 ],
[email protected]a6cf87e2009-04-03 04:07:38251 'ldflags': [
[email protected]9d384032009-03-20 23:13:26252 '-pthread',
253 ],
[email protected]b5e46b92009-03-26 18:58:10254 'scons_variable_settings': {
255 'LIBPATH': ['$LIB_DIR'],
[email protected]9d384032009-03-20 23:13:26256 # Linking of large files uses lots of RAM, so serialize links
257 # using the handy flock command from util-linux.
[email protected]c13fcbd2009-03-27 04:27:01258 'FLOCK_LINK': ['flock', '$TOP_BUILDDIR/linker.lock', '$LINK'],
[email protected]789fbb7c2009-04-02 16:20:31259 'FLOCK_SHLINK': ['flock', '$TOP_BUILDDIR/linker.lock', '$SHLINK'],
260 'FLOCK_LDMODULE': ['flock', '$TOP_BUILDDIR/linker.lock', '$LDMODULE'],
[email protected]9d384032009-03-20 23:13:26261
262 # We have several cases where archives depend on each other in
263 # a cyclic fashion. Since the GNU linker does only a single
264 # pass over the archives we surround the libraries with
265 # --start-group and --end-group (aka -( and -) ). That causes
266 # ld to loop over the group until no more undefined symbols
267 # are found. In an ideal world we would only make groups from
268 # those libraries which we knew to be in cycles. However,
269 # that's tough with SCons, so we bodge it by making all the
270 # archives a group by redefining the linking command here.
271 #
272 # TODO: investigate whether we still have cycles that
273 # require --{start,end}-group. There has been a lot of
274 # refactoring since this was first coded, which might have
275 # eliminated the circular dependencies.
[email protected]12862922009-04-20 21:36:41276 #
277 # Note: $_LIBDIRFLAGS comes before ${LINK,SHLINK,LDMODULE}FLAGS
278 # so that we prefer our own built libraries (e.g. -lpng) to
279 # system versions of libraries that pkg-config might turn up.
280 # TODO(sgk): investigate handling this not by re-ordering the
281 # flags this way, but by adding a hook to use the SCons
282 # ParseFlags() option on the output from pkg-config.
283 'LINKCOM': [['$FLOCK_LINK', '-o', '$TARGET', '$_LIBDIRFLAGS', '$LINKFLAGS', '$SOURCES', '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']],
284 'SHLINKCOM': [['$FLOCK_SHLINK', '-o', '$TARGET', '$_LIBDIRFLAGS', '$SHLINKFLAGS', '$SOURCES', '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']],
285 'LDMODULECOM': [['$FLOCK_LDMODULE', '-o', '$TARGET', '$_LIBDIRFLAGS', '$LDMODULEFLAGS', '$SOURCES', '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']],
[email protected]9d384032009-03-20 23:13:26286 'IMPLICIT_COMMAND_DEPENDENCIES': 0,
[email protected]d0644282009-04-22 00:20:29287 # -rpath is only used when building with shared libraries.
288 'conditions': [
289 [ 'library=="shared_library"', {
290 'RPATH': '$LIB_DIR',
291 }],
292 ],
[email protected]9d384032009-03-20 23:13:26293 },
[email protected]b5e46b92009-03-26 18:58:10294 'scons_import_variables': [
[email protected]52049d5c2009-05-01 20:32:49295 'AS',
[email protected]b5e46b92009-03-26 18:58:10296 'CC',
297 'CXX',
298 'LINK',
299 ],
300 'scons_propagate_variables': [
[email protected]52049d5c2009-05-01 20:32:49301 'AS',
[email protected]b5e46b92009-03-26 18:58:10302 'CC',
303 'CCACHE_DIR',
304 'CXX',
305 'DISTCC_DIR',
306 'DISTCC_HOSTS',
307 'HOME',
[email protected]5ae4f55e2009-04-13 23:19:47308 'INCLUDE_SERVER_ARGS',
309 'INCLUDE_SERVER_PORT',
[email protected]b5e46b92009-03-26 18:58:10310 'LINK',
[email protected]fff920a2009-05-08 22:35:32311 'CHROME_BUILD_TYPE',
312 'CHROMIUM_BUILD',
313 'OFFICIAL_BUILD',
[email protected]b5e46b92009-03-26 18:58:10314 ],
[email protected]3aacaf952009-04-02 15:34:09315 'configurations': {
316 'Debug': {
[email protected]c5bdc032009-04-20 19:11:31317 'variables': {
318 'debug_optimize%': '0',
319 },
[email protected]3aacaf952009-04-02 15:34:09320 'defines': [
321 '_DEBUG',
322 ],
323 'cflags': [
[email protected]c5bdc032009-04-20 19:11:31324 '-O<(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:09325 '-g',
[email protected]9a5d2a52009-05-22 03:37:45326 # One can use '-gstabs' to enable building the debugging
327 # information in STABS format for breakpad's dumpsyms.
[email protected]3aacaf952009-04-02 15:34:09328 ],
[email protected]96fd0032009-04-24 00:13:08329 'ldflags': [
330 '-rdynamic', # Allows backtrace to resolve symbols.
331 ],
[email protected]5315f2842009-04-28 00:43:27332 },
[email protected]3aacaf952009-04-02 15:34:09333 'Release': {
[email protected]740e2de2009-07-21 11:41:01334 'variables': {
335 'release_optimize%': '2',
336 },
[email protected]3aacaf952009-04-02 15:34:09337 'cflags': [
[email protected]740e2de2009-07-21 11:41:01338 '-O<(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:53339 # Don't emit the GCC version ident directives, they just end up
340 # in the .comment section taking up binary size.
341 '-fno-ident',
342 # Put data and code in their own sections, so that unused symbols
343 # can be removed at link time with --gc-sections.
344 '-fdata-sections',
345 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:09346 ],
347 },
348 },
[email protected]601b540222009-04-03 21:32:04349 'variants': {
350 'coverage': {
351 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
352 'ldflags': ['-fprofile-arcs'],
353 },
354 'profile': {
355 'cflags': ['-pg', '-g'],
356 'ldflags': ['-pg'],
357 },
358 'symbols': {
359 'cflags': ['-g'],
360 },
361 },
[email protected]606116d22009-05-06 22:38:23362 'conditions': [
[email protected]8a2fcba2009-07-29 00:52:24363 [ 'target_arch!="arm"', {
[email protected]606116d22009-05-06 22:38:23364 '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]1c6560af2009-07-14 11:02:16405 ],
[email protected]606116d22009-05-06 22:38:23406 'ldflags': [
407 '-m32',
408 ],
409 }],
410 ],
[email protected]9d384032009-03-20 23:13:26411 },
412 }],
[email protected]2f80c312009-02-25 21:26:55413 ['OS=="mac"', {
414 'target_defaults': {
[email protected]24700642009-06-01 16:01:20415 'variables': {
416 # This should be 'mac_real_dsym%', but there seems to be a bug
417 # with % in variables that are intended to be set to different
418 # values in different targets, like this one.
419 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
[email protected]64eba222009-07-14 18:43:42420 # Release defaults to the Xcode optimization default, this var
421 # lets you force the value.
422 'mac_release_optimization%': 'UNSET'
[email protected]24700642009-06-01 16:01:20423 },
[email protected]d92c7c012009-03-19 19:26:42424 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:55425 'xcode_settings': {
426 'ALWAYS_SEARCH_USER_PATHS': 'NO',
427 'GCC_C_LANGUAGE_STANDARD': 'c99',
428 'GCC_CW_ASM_SYNTAX': 'NO',
[email protected]7cf57d172009-06-03 18:15:22429 'GCC_DYNAMIC_NO_PIC': 'NO',
[email protected]2f80c312009-02-25 21:26:55430 'GCC_ENABLE_PASCAL_STRINGS': 'NO',
431 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]793c3d72009-04-10 15:46:34432 'GCC_OBJC_CALL_CXX_CDTORS': 'YES',
[email protected]2f80c312009-02-25 21:26:55433 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES',
434 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES',
435 'GCC_VERSION': '4.2',
436 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES',
437 'MACOSX_DEPLOYMENT_TARGET': '10.5',
438 'PREBINDING': 'NO',
439 'SDKROOT': 'macosx10.5',
440 'USE_HEADERMAP': 'NO',
441 'WARNING_CFLAGS': ['-Wall', '-Wendif-labels'],
[email protected]b3fb8092009-03-12 19:09:24442 'conditions': [
443 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
444 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}],
445 ],
[email protected]2f80c312009-02-25 21:26:55446 },
447 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:55448 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:46449 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
450 }],
451 ['_mac_bundle', {
452 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:08453 }],
[email protected]d92c7c012009-03-19 19:26:42454 ['_type=="executable"', {
[email protected]24700642009-06-01 16:01:20455 'target_conditions': [
456 ['mac_real_dsym == 1', {
457 # To get a real .dSYM bundle produced by dsymutil, set the
458 # debug information format to dwarf-with-dsym. Since
459 # strip_from_xcode will not be used, set Xcode to do the
460 # stripping as well.
461 'configurations': {
462 'Release': {
463 'xcode_settings': {
464 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
465 'DEPLOYMENT_POSTPROCESSING': 'YES',
466 'STRIP_INSTALLED_PRODUCT': 'YES',
467 },
468 },
[email protected]2f80c312009-02-25 21:26:55469 },
[email protected]24700642009-06-01 16:01:20470 }, { # mac_real_dsym != 1
471 # To get a fast fake .dSYM bundle, use a post-build step to
472 # produce the .dSYM and strip the executable. strip_from_xcode
473 # only operates in the Release configuration.
474 'postbuilds': [
475 {
476 'variables': {
477 # Define strip_from_xcode in a variable ending in _path
478 # so that gyp understands it's a path and performs proper
479 # relativization during dict merging.
480 'strip_from_xcode_path': 'mac/strip_from_xcode',
481 },
482 'postbuild_name': 'Strip If Needed',
483 'action': ['<(strip_from_xcode_path)'],
484 },
485 ],
486 }],
[email protected]2f80c312009-02-25 21:26:55487 ],
488 }],
489 ],
490 },
491 }],
492 ['OS=="win"', {
493 'target_defaults': {
494 'defines': [
495 '_WIN32_WINNT=0x0600',
496 'WINVER=0x0600',
497 'WIN32',
498 '_WINDOWS',
499 '_HAS_EXCEPTIONS=0',
500 'NOMINMAX',
501 '_CRT_RAND_S',
502 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
503 'WIN32_LEAN_AND_MEAN',
504 '_SECURE_ATL',
[email protected]adfb98c2009-06-23 20:08:45505 '_HAS_TR1=0',
[email protected]2f80c312009-02-25 21:26:55506 ],
[email protected]5b5ca7cb2009-07-20 23:00:20507 'msvs_system_include_dirs': [
[email protected]2f80c312009-02-25 21:26:55508 '<(DEPTH)/third_party/platformsdk_win2008_6_1/files/Include',
509 '$(VSInstallDir)/VC/atlmfc/include',
510 ],
511 'msvs_cygwin_dirs': ['../third_party/cygwin'],
[email protected]6840561772009-05-12 16:37:55512 'msvs_disabled_warnings': [4396, 4503, 4819],
[email protected]2f80c312009-02-25 21:26:55513 'msvs_settings': {
514 'VCCLCompilerTool': {
515 'MinimalRebuild': 'false',
516 'ExceptionHandling': '0',
517 'BufferSecurityCheck': 'true',
518 'EnableFunctionLevelLinking': 'true',
519 'RuntimeTypeInfo': 'false',
520 'WarningLevel': '3',
521 'WarnAsError': 'true',
522 'DebugInformationFormat': '3',
523 },
524 'VCLibrarianTool': {
525 'AdditionalOptions': '/ignore:4221',
[email protected]2f80c312009-02-25 21:26:55526 'AdditionalLibraryDirectories':
[email protected]07506b502009-06-29 00:30:51527 ['<(DEPTH)/third_party/platformsdk_win2008_6_1/files/Lib'],
[email protected]2f80c312009-02-25 21:26:55528 },
529 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:55530 'AdditionalDependencies': [
531 'wininet.lib',
532 'version.lib',
533 'msimg32.lib',
534 'ws2_32.lib',
535 'usp10.lib',
536 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:08537 'dbghelp.lib',
[email protected]2f80c312009-02-25 21:26:55538 ],
539 'AdditionalLibraryDirectories':
[email protected]07506b502009-06-29 00:30:51540 ['<(DEPTH)/third_party/platformsdk_win2008_6_1/files/Lib'],
[email protected]2f80c312009-02-25 21:26:55541 'GenerateDebugInformation': 'true',
542 'MapFileName': '$(OutDir)\\$(TargetName).map',
543 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
544 'TargetMachine': '1',
545 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:48546 # SubSystem values:
547 # 0 == not set
548 # 1 == /SUBSYSTEM:CONSOLE
549 # 2 == /SUBSYSTEM:WINDOWS
550 # Most of the executables we'll ever create are tests
551 # and utilities with console output.
552 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:55553 },
554 'VCMIDLTool': {
555 'GenerateStublessProxies': 'true',
556 'TypeLibraryName': '$(InputName).tlb',
557 'OutputDirectory': '$(IntDir)',
558 'HeaderFileName': '$(InputName).h',
559 'DLLDataFileName': 'dlldata.c',
560 'InterfaceIdentifierFileName': '$(InputName)_i.c',
561 'ProxyFileName': '$(InputName)_p.c',
562 },
563 'VCResourceCompilerTool': {
564 'Culture' : '1033',
[email protected]245b3cd592009-03-31 01:12:14565 'AdditionalIncludeDirectories': ['<(DEPTH)'],
[email protected]2f80c312009-02-25 21:26:55566 },
567 },
568 },
569 }],
570 ['chromium_code==0', {
571 # This section must follow the other conditon sections above because
572 # external_code.gypi expects to be merged into those settings.
573 'includes': [
574 'external_code.gypi',
575 ],
[email protected]dce5df52009-06-29 17:58:25576 }, {
577 'target_defaults': {
578 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the
579 # C99 macros on Mac and Linux.
580 'defines': [
581 '__STDC_FORMAT_MACROS',
582 ],
583 },
[email protected]2f80c312009-02-25 21:26:55584 }],
[email protected]48c7af72009-07-03 22:00:19585 ['msvs_use_common_linker_extras', {
586 'target_defaults': {
587 'msvs_settings': {
588 'VCLinkerTool': {
589 'AdditionalOptions':
590 '/safeseh /dynamicbase /ignore:4199 /ignore:4221 /nxcompat',
591 'DelayLoadDLLs': [
592 'dbghelp.dll',
593 'dwmapi.dll',
594 'uxtheme.dll',
595 ],
596 },
597 },
598 },
599 }],
[email protected]2f80c312009-02-25 21:26:55600 ],
[email protected]c13fcbd2009-03-27 04:27:01601 'scons_settings': {
602 'sconsbuild_dir': '<(DEPTH)/sconsbuild',
603 },
[email protected]2f80c312009-02-25 21:26:55604 'xcode_settings': {
605 # The Xcode generator will look for an xcode_settings section at the root
606 # of each dict and use it to apply settings on a file-wide basis. Most
607 # settings should not be here, they should be in target-specific
608 # xcode_settings sections, or better yet, should use non-Xcode-specific
609 # settings in target dicts. SYMROOT is a special case, because many other
610 # Xcode variables depend on it, including variables such as
611 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
612 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
613 # files to appear (when present) in the UI as actual files and not red
614 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
615 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:16616 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:55617 },
618}