[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1 | # 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] | b3fb809 | 2009-03-12 19:09:24 | [diff] [blame] | 7 | # .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] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 11 | 'chromium_code%': 0, |
[email protected] | b3fb809 | 2009-03-12 19:09:24 | [diff] [blame] | 12 | |
| 13 | # Variables expected to be overriden on the GYP command line (-D) or by |
| 14 | # ~/.gyp/include.gypi. |
| 15 | |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 16 | # Putting a variables dict inside another variables dict looks kind of |
| 17 | # weird. This is done so that "branding" and "buildtype" are defined as |
| 18 | # variables within the outer variables dict here. This is necessary |
| 19 | # to get these variables defined for the conditions within this variables |
| 20 | # dict that operate on these variables. |
| 21 | 'variables': { |
| 22 | # Override branding to select the desired branding flavor. |
| 23 | 'branding%': 'Chromium', |
| 24 | |
| 25 | # Override buildtype to select the desired build flavor. |
| 26 | # Dev - everyday build for development/testing |
| 27 | # Official - release build (generally implies additional processing) |
| 28 | # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp |
| 29 | # conversion is done), some of the things which are now controlled by |
| 30 | # 'branding', such as symbol generation, will need to be refactored based |
| 31 | # on 'buildtype' (i.e. we don't care about saving symbols for non-Official |
| 32 | # builds). |
| 33 | 'buildtype%': 'Dev', |
| 34 | }, |
| 35 | |
| 36 | # Define branding and buildtype on the basis of their settings within the |
| 37 | # variables sub-dict above, unless overridden. |
| 38 | 'branding%': '<(branding)', |
| 39 | 'buildtype%': '<(buildtype)', |
| 40 | |
[email protected] | b3fb809 | 2009-03-12 19:09:24 | [diff] [blame] | 41 | # Override chromium_mac_pch and set it to 0 to suppress the use of |
| 42 | # precompiled headers on the Mac. Prefix header injection may still be |
| 43 | # used, but prefix headers will not be precompiled. This is useful when |
| 44 | # using distcc to distribute a build to compile slaves that don't |
| 45 | # share the same compiler executable as the system driving the compilation, |
| 46 | # because precompiled headers rely on pointers into a specific compiler |
| 47 | # executable's image. Setting this to 0 is needed to use an experimental |
| 48 | # Linux-Mac cross compiler distcc farm. |
| 49 | 'chromium_mac_pch%': 1, |
| 50 | |
[email protected] | f5ecbba1 | 2009-04-03 04:35:18 | [diff] [blame] | 51 | # Set to 1 to enable code coverage. In addition to build changes |
| 52 | # (e.g. extra CFLAGS), also creates a new target in the src/chrome |
| 53 | # project file called "coverage". |
| 54 | # Currently ignored on Windows. |
| 55 | 'coverage%': 0, |
[email protected] | 653bd5f03 | 2009-04-08 12:55:49 | [diff] [blame] | 56 | |
[email protected] | c61f643 | 2009-04-22 01:16:42 | [diff] [blame] | 57 | # Overridable specification for potential use of alternative |
| 58 | # JavaScript engines. |
| 59 | 'javascript_engine%': 'v8', |
| 60 | |
[email protected] | 653bd5f03 | 2009-04-08 12:55:49 | [diff] [blame] | 61 | # To do a shared build on linux we need to be able to choose between type |
| 62 | # static_library and shared_library. We default to doing a static build |
| 63 | # but you can override this with "gyp -Dlibrary=shared_library" or you |
| 64 | # can add the following line (without the #) to ~/.gyp/include.gypi |
| 65 | # {'variables': {'library': 'shared_library'}} |
| 66 | # to compile as shared by default |
| 67 | 'library%': 'static_library', |
[email protected] | e5b2eaa | 2009-04-14 01:39:12 | [diff] [blame] | 68 | |
| 69 | # TODO(bradnelson): eliminate this when possible. |
| 70 | # To allow local gyp files to prevent release.vsprops from being included. |
| 71 | # Yes(1) means include release.vsprops. |
| 72 | # Once all vsprops settings are migrated into gyp, this can go away. |
| 73 | 'msvs_use_common_release%': 1, |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 74 | |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 75 | # TODO(bradnelson): eliminate this when possible. |
| 76 | # To allow local gyp files to override additional linker options for msvs. |
| 77 | # Yes(1) means set use the common linker options. |
| 78 | 'msvs_use_common_linker_extras%': 1, |
| 79 | |
[email protected] | 1ffb650 | 2009-06-02 07:46:24 | [diff] [blame] | 80 | # TODO(sgk): eliminate this if possible. |
| 81 | # It would be nicer to support this via a setting in 'target_defaults' |
| 82 | # in chrome/app/locales/locales.gypi overriding the setting in the |
| 83 | # 'Debug' configuration in the 'target_defaults' dict below, |
| 84 | # but that doesn't work as we'd like. |
| 85 | 'msvs_debug_link_incremental%': '2', |
| 86 | |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 87 | # The architecture that we're building on. |
| 88 | 'target_arch%': 'ia32', |
[email protected] | e697023 | 2009-05-12 23:51:17 | [diff] [blame] | 89 | |
| 90 | # By default linux does not use views. To turn on views in Linux |
| 91 | # set the variable GYP_DEFINES to "toolkit_views=1", or modify |
| 92 | # ~/.gyp/include.gypi . |
| 93 | 'toolkit_views%': 0, |
[email protected] | 2b883b9 | 2009-06-02 22:57:50 | [diff] [blame] | 94 | |
[email protected] | 1677984 | 2009-07-08 23:45:29 | [diff] [blame] | 95 | 'chromeos%': 0, |
[email protected] | 397fe9d | 2009-06-30 00:02:27 | [diff] [blame] | 96 | |
[email protected] | b66b7bd | 2009-06-11 20:16:10 | [diff] [blame] | 97 | 'chrome_personalization%': 0, |
[email protected] | 214d0fd | 2009-07-15 01:41:50 | [diff] [blame] | 98 | |
| 99 | # Set the restrictions on the SUID sandbox binary. |
| 100 | # Path: only exec the hard coded chrome binary path |
| 101 | # User: only exec binaries owned by the running user. |
| 102 | # |
| 103 | # Developers should read |
| 104 | # http://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment |
[email protected] | 57313614 | 2009-07-15 22:48:37 | [diff] [blame] | 105 | 'linux_suid_sandbox_restrictions%': 'Path', |
| 106 | |
| 107 | # This is the location of the sandbox binary. Chrome looks for this before |
| 108 | # running the zygote process. If found, and SUID, it will be used to |
| 109 | # sandbox the zygote process and, thus, all renderer processes. |
| 110 | 'linux_sandbox_path%': '', |
| 111 | |
| 112 | # If |linux_suid_sandbox_restrictions|, above, is 'Path' then only a single |
| 113 | # path is allowed to be exec'ed by the sandbox for security reasons. That |
| 114 | # path is set here. It should be the final location of the Chromium binary |
| 115 | # on the system. |
| 116 | 'linux_sandbox_chrome_path%': '/opt/google/chrome/chrome', |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 117 | |
| 118 | 'conditions': [ |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 119 | ['OS=="mac"', { |
| 120 | 'conditions': [ |
| 121 | # mac_product_name is set to the name of the .app bundle as it should |
| 122 | # appear on disk. This duplicates data from |
| 123 | # chrome/app/theme/chromium/BRANDING and |
| 124 | # chrome/app/theme/google_chrome/BRANDING, but is necessary to get |
| 125 | # these names into the build system. |
| 126 | ['branding=="Chrome"', { |
| 127 | 'mac_product_name%': 'Google Chrome', |
| 128 | }, { # else: branding!="Chrome" |
| 129 | 'mac_product_name%': 'Chromium', |
| 130 | }], |
| 131 | |
| 132 | # Feature variables for enabling Mac Breakpad and Keystone auto-update |
| 133 | # support. Both features are on by default in official builds with |
| 134 | # Chrome branding. |
| 135 | ['branding=="Chrome" and buildtype=="Official"', { |
| 136 | 'mac_breakpad%': 1, |
| 137 | 'mac_keystone%': 1, |
| 138 | }, { # else: branding!="Chrome" or buildtype!="Official" |
| 139 | 'mac_breakpad%': 0, |
| 140 | 'mac_keystone%': 0, |
| 141 | }], |
| 142 | ], |
| 143 | }], # OS=="mac" |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 144 | # Whether to use multiple cores to compile with visual studio. This is |
| 145 | # optional because it sometimes causes corruption on VS 2005. |
| 146 | # It is on by default on VS 2008 and off on VS 2005. |
| 147 | ['OS=="win"', { |
| 148 | 'conditions': [ |
| 149 | ['MSVS_VERSION=="2005"', { |
| 150 | 'msvs_multi_core_compile%': 0, |
| 151 | },{ |
| 152 | 'msvs_multi_core_compile%': 1, |
| 153 | }], |
[email protected] | 10bb8c9 | 2009-08-07 21:16:03 | [diff] [blame] | 154 | # Don't do incremental linking for large modules on 32-bit. |
| 155 | ['MSVS_OS_BITS==32', { |
| 156 | 'msvs_large_module_debug_link_mode%': '1', # No |
| 157 | },{ |
| 158 | 'msvs_large_module_debug_link_mode%': '2', # Yes |
| 159 | }], |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 160 | ], |
| 161 | }], |
| 162 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 163 | }, |
| 164 | 'target_defaults': { |
[email protected] | 32aa8cc | 2009-03-04 21:36:39 | [diff] [blame] | 165 | 'conditions': [ |
| 166 | ['branding=="Chrome"', { |
| 167 | 'defines': ['GOOGLE_CHROME_BUILD'], |
[email protected] | f70085e4 | 2009-05-28 20:31:48 | [diff] [blame] | 168 | 'conditions': [ |
| 169 | ['OS=="linux"', { |
| 170 | 'cflags': [ '-gstabs' ], |
| 171 | }], |
| 172 | ], |
[email protected] | 32aa8cc | 2009-03-04 21:36:39 | [diff] [blame] | 173 | }, { # else: branding!="Chrome" |
| 174 | 'defines': ['CHROMIUM_BUILD'], |
| 175 | }], |
[email protected] | 6cb1cec | 2009-05-15 03:05:20 | [diff] [blame] | 176 | ['toolkit_views==1', { |
[email protected] | e697023 | 2009-05-12 23:51:17 | [diff] [blame] | 177 | 'defines': ['TOOLKIT_VIEWS=1'], |
| 178 | }], |
[email protected] | 1677984 | 2009-07-08 23:45:29 | [diff] [blame] | 179 | ['chromeos==1', { |
| 180 | 'defines': ['OS_CHROMEOS=1'], |
[email protected] | 2b883b9 | 2009-06-02 22:57:50 | [diff] [blame] | 181 | }], |
[email protected] | b66b7bd | 2009-06-11 20:16:10 | [diff] [blame] | 182 | ['chrome_personalization==1', { |
| 183 | 'defines': ['CHROME_PERSONALIZATION=1'], |
| 184 | }], |
[email protected] | f5ecbba1 | 2009-04-03 04:35:18 | [diff] [blame] | 185 | ['coverage!=0', { |
| 186 | 'conditions': [ |
| 187 | ['OS=="mac"', { |
| 188 | 'xcode_settings': { |
| 189 | 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', |
| 190 | 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', |
[email protected] | 5ae4f55e | 2009-04-13 23:19:47 | [diff] [blame] | 191 | }, |
[email protected] | f5ecbba1 | 2009-04-03 04:35:18 | [diff] [blame] | 192 | # Add -lgcov for executables, not for static_libraries. |
| 193 | # This is a delayed conditional. |
| 194 | 'target_conditions': [ |
| 195 | ['_type=="executable"', { |
| 196 | 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] }, |
[email protected] | 5ae4f55e | 2009-04-13 23:19:47 | [diff] [blame] | 197 | }], |
| 198 | ], |
| 199 | }], |
[email protected] | 7122ffd5 | 2009-04-30 23:19:00 | [diff] [blame] | 200 | # Linux gyp (into scons) doesn't like target_conditions? |
| 201 | # TODO(???): track down why 'target_conditions' doesn't work |
| 202 | # on Linux gyp into scons like it does on Mac gyp into xcodeproj. |
[email protected] | f5ecbba1 | 2009-04-03 04:35:18 | [diff] [blame] | 203 | ['OS=="linux"', { |
| 204 | 'cflags': [ '-ftest-coverage', |
| 205 | '-fprofile-arcs' ], |
[email protected] | 7122ffd5 | 2009-04-30 23:19:00 | [diff] [blame] | 206 | 'link_settings': { 'libraries': [ '-lgcov' ] }, |
[email protected] | f5ecbba1 | 2009-04-03 04:35:18 | [diff] [blame] | 207 | }], |
[email protected] | e8f6ff4 | 2009-07-07 18:20:53 | [diff] [blame] | 208 | # Finally, for Windows, we simply turn on profiling. |
| 209 | ['OS=="win"', { |
| 210 | 'msvs_settings': { |
| 211 | 'VCLinkerTool': { |
| 212 | 'Profile': 'true', |
| 213 | }, |
[email protected] | 10bb8c9 | 2009-08-07 21:16:03 | [diff] [blame] | 214 | 'VCCLCompilerTool': { |
[email protected] | e8f6ff4 | 2009-07-07 18:20:53 | [diff] [blame] | 215 | # /Z7, not /Zi, so coverage is happyb |
| 216 | 'DebugInformationFormat': '1', |
| 217 | 'AdditionalOptions': '/Yd', |
| 218 | } |
| 219 | } |
| 220 | }], # OS==win |
| 221 | ], # conditions for coverage |
| 222 | }], # coverage!=0 |
| 223 | ], # conditions for 'target_defaults' |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 224 | 'default_configuration': 'Debug', |
| 225 | 'configurations': { |
[email protected] | 825ff8d | 2009-05-22 01:40:48 | [diff] [blame] | 226 | # VCLinkerTool LinkIncremental values below: |
| 227 | # 0 == default |
| 228 | # 1 == /INCREMENTAL:NO |
| 229 | # 2 == /INCREMENTAL |
| 230 | # Debug links incremental, Release does not. |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 231 | 'Debug': { |
| 232 | 'conditions': [ |
| 233 | [ 'OS=="mac"', { |
| 234 | 'xcode_settings': { |
| 235 | 'COPY_PHASE_STRIP': 'NO', |
| 236 | 'GCC_OPTIMIZATION_LEVEL': '0', |
| 237 | } |
| 238 | }], |
| 239 | [ 'OS=="win"', { |
| 240 | 'configuration_platform': 'Win32', |
| 241 | 'msvs_configuration_attributes': { |
| 242 | 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)', |
| 243 | 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)', |
| 244 | 'CharacterSet': '1', |
| 245 | }, |
| 246 | 'msvs_settings': { |
| 247 | 'VCCLCompilerTool': { |
| 248 | 'Optimization': '0', |
| 249 | 'PreprocessorDefinitions': ['_DEBUG'], |
| 250 | 'BasicRuntimeChecks': '3', |
| 251 | 'RuntimeLibrary': '1', |
| 252 | }, |
| 253 | 'VCLinkerTool': { |
[email protected] | 1ffb650 | 2009-06-02 07:46:24 | [diff] [blame] | 254 | 'LinkIncremental': '<(msvs_debug_link_incremental)', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 255 | }, |
| 256 | 'VCResourceCompilerTool': { |
| 257 | 'PreprocessorDefinitions': ['_DEBUG'], |
| 258 | }, |
| 259 | }, |
| 260 | }], |
| 261 | ], |
| 262 | }, |
| 263 | 'Release': { |
| 264 | 'defines': [ |
| 265 | 'NDEBUG', |
| 266 | ], |
| 267 | 'conditions': [ |
| 268 | [ 'OS=="mac"', { |
| 269 | 'xcode_settings': { |
| 270 | 'DEAD_CODE_STRIPPING': 'YES', |
[email protected] | 64eba22 | 2009-07-14 18:43:42 | [diff] [blame] | 271 | 'conditions': [ |
| 272 | ['mac_release_optimization != "UNSET"', |
| 273 | {'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)'}], |
| 274 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 275 | } |
| 276 | }], |
[email protected] | e5b2eaa | 2009-04-14 01:39:12 | [diff] [blame] | 277 | [ 'OS=="win" and msvs_use_common_release', { |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 278 | 'configuration_platform': 'Win32', |
| 279 | 'msvs_props': ['release.vsprops'], |
| 280 | }], |
[email protected] | 825ff8d | 2009-05-22 01:40:48 | [diff] [blame] | 281 | [ 'OS=="win"', { |
| 282 | 'msvs_settings': { |
| 283 | 'VCLinkerTool': { |
| 284 | 'LinkIncremental': '1', |
| 285 | }, |
| 286 | }, |
| 287 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 288 | ], |
| 289 | }, |
[email protected] | f926fa0a | 2009-08-04 22:50:13 | [diff] [blame] | 290 | 'conditions': [ |
| 291 | [ 'OS=="win"', { |
| 292 | # TODO(bradnelson): add a gyp mechanism to make this more graceful. |
| 293 | 'Purify': { |
| 294 | 'defines': [ |
| 295 | 'NDEBUG', |
| 296 | 'PURIFY', |
| 297 | 'NO_TCMALLOC', |
| 298 | ], |
| 299 | 'msvs_settings': { |
| 300 | 'VCCLCompilerTool': { |
| 301 | 'Optimization': '0', |
| 302 | 'RuntimeLibrary': '0', |
| 303 | 'BufferSecurityCheck': 'false', |
| 304 | }, |
| 305 | 'VCLinkerTool': { |
| 306 | 'EnableCOMDATFolding': '1', |
| 307 | 'LinkIncremental': '1', |
| 308 | }, |
| 309 | }, |
| 310 | 'conditions': [ |
| 311 | [ 'msvs_use_common_release', { |
| 312 | 'configuration_platform': 'Win32', |
| 313 | 'msvs_props': ['release.vsprops'], |
| 314 | }], |
| 315 | ], |
| 316 | }, |
| 317 | 'Release - no tcmalloc': { |
| 318 | 'defines': [ |
| 319 | 'NDEBUG', |
| 320 | 'NO_TCMALLOC', |
| 321 | ], |
| 322 | 'conditions': [ |
| 323 | [ 'msvs_use_common_release', { |
| 324 | 'configuration_platform': 'Win32', |
| 325 | 'msvs_props': ['release.vsprops'], |
| 326 | }], |
| 327 | ], |
| 328 | 'msvs_settings': { |
| 329 | 'VCLinkerTool': { |
| 330 | 'LinkIncremental': '1', |
| 331 | }, |
| 332 | }, |
| 333 | }, |
| 334 | }], |
| 335 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 336 | }, |
| 337 | }, |
| 338 | 'conditions': [ |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 339 | ['OS=="linux"', { |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 340 | 'target_defaults': { |
[email protected] | 5315f284 | 2009-04-28 00:43:27 | [diff] [blame] | 341 | # Enable -Werror by default, but put it in a variable so it can |
| 342 | # be disabled in ~/.gyp/include.gypi on the valgrind builders. |
| 343 | 'variables': { |
| 344 | 'werror%': '-Werror', |
| 345 | }, |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 346 | 'cflags': [ |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 347 | '<(werror)', # See note above about the werror variable. |
| 348 | '-pthread', |
[email protected] | 8a2fcba | 2009-07-29 00:52:24 | [diff] [blame] | 349 | '-fno-exceptions', |
| 350 | '-Wall', |
[email protected] | 49930c3a | 2009-08-06 21:23:07 | [diff] [blame] | 351 | '-D_FILE_OFFSET_BITS=64', |
[email protected] | 8a2fcba | 2009-07-29 00:52:24 | [diff] [blame] | 352 | ], |
| 353 | 'cflags_cc': [ |
| 354 | '-fno-threadsafe-statics', |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 355 | ], |
[email protected] | a6cf87e | 2009-04-03 04:07:38 | [diff] [blame] | 356 | 'ldflags': [ |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 357 | '-pthread', |
| 358 | ], |
[email protected] | b5e46b9 | 2009-03-26 18:58:10 | [diff] [blame] | 359 | 'scons_variable_settings': { |
| 360 | 'LIBPATH': ['$LIB_DIR'], |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 361 | # Linking of large files uses lots of RAM, so serialize links |
| 362 | # using the handy flock command from util-linux. |
[email protected] | c13fcbd | 2009-03-27 04:27:01 | [diff] [blame] | 363 | 'FLOCK_LINK': ['flock', '$TOP_BUILDDIR/linker.lock', '$LINK'], |
[email protected] | 789fbb7c | 2009-04-02 16:20:31 | [diff] [blame] | 364 | 'FLOCK_SHLINK': ['flock', '$TOP_BUILDDIR/linker.lock', '$SHLINK'], |
| 365 | 'FLOCK_LDMODULE': ['flock', '$TOP_BUILDDIR/linker.lock', '$LDMODULE'], |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 366 | |
| 367 | # We have several cases where archives depend on each other in |
| 368 | # a cyclic fashion. Since the GNU linker does only a single |
| 369 | # pass over the archives we surround the libraries with |
| 370 | # --start-group and --end-group (aka -( and -) ). That causes |
| 371 | # ld to loop over the group until no more undefined symbols |
| 372 | # are found. In an ideal world we would only make groups from |
| 373 | # those libraries which we knew to be in cycles. However, |
| 374 | # that's tough with SCons, so we bodge it by making all the |
| 375 | # archives a group by redefining the linking command here. |
| 376 | # |
| 377 | # TODO: investigate whether we still have cycles that |
| 378 | # require --{start,end}-group. There has been a lot of |
| 379 | # refactoring since this was first coded, which might have |
| 380 | # eliminated the circular dependencies. |
[email protected] | 1286292 | 2009-04-20 21:36:41 | [diff] [blame] | 381 | # |
| 382 | # Note: $_LIBDIRFLAGS comes before ${LINK,SHLINK,LDMODULE}FLAGS |
| 383 | # so that we prefer our own built libraries (e.g. -lpng) to |
| 384 | # system versions of libraries that pkg-config might turn up. |
| 385 | # TODO(sgk): investigate handling this not by re-ordering the |
| 386 | # flags this way, but by adding a hook to use the SCons |
| 387 | # ParseFlags() option on the output from pkg-config. |
| 388 | 'LINKCOM': [['$FLOCK_LINK', '-o', '$TARGET', '$_LIBDIRFLAGS', '$LINKFLAGS', '$SOURCES', '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']], |
| 389 | 'SHLINKCOM': [['$FLOCK_SHLINK', '-o', '$TARGET', '$_LIBDIRFLAGS', '$SHLINKFLAGS', '$SOURCES', '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']], |
| 390 | 'LDMODULECOM': [['$FLOCK_LDMODULE', '-o', '$TARGET', '$_LIBDIRFLAGS', '$LDMODULEFLAGS', '$SOURCES', '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']], |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 391 | 'IMPLICIT_COMMAND_DEPENDENCIES': 0, |
[email protected] | d064428 | 2009-04-22 00:20:29 | [diff] [blame] | 392 | # -rpath is only used when building with shared libraries. |
| 393 | 'conditions': [ |
| 394 | [ 'library=="shared_library"', { |
| 395 | 'RPATH': '$LIB_DIR', |
| 396 | }], |
| 397 | ], |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 398 | }, |
[email protected] | b5e46b9 | 2009-03-26 18:58:10 | [diff] [blame] | 399 | 'scons_import_variables': [ |
[email protected] | 52049d5c | 2009-05-01 20:32:49 | [diff] [blame] | 400 | 'AS', |
[email protected] | b5e46b9 | 2009-03-26 18:58:10 | [diff] [blame] | 401 | 'CC', |
| 402 | 'CXX', |
| 403 | 'LINK', |
| 404 | ], |
| 405 | 'scons_propagate_variables': [ |
[email protected] | 52049d5c | 2009-05-01 20:32:49 | [diff] [blame] | 406 | 'AS', |
[email protected] | b5e46b9 | 2009-03-26 18:58:10 | [diff] [blame] | 407 | 'CC', |
| 408 | 'CCACHE_DIR', |
| 409 | 'CXX', |
| 410 | 'DISTCC_DIR', |
| 411 | 'DISTCC_HOSTS', |
| 412 | 'HOME', |
[email protected] | 5ae4f55e | 2009-04-13 23:19:47 | [diff] [blame] | 413 | 'INCLUDE_SERVER_ARGS', |
| 414 | 'INCLUDE_SERVER_PORT', |
[email protected] | b5e46b9 | 2009-03-26 18:58:10 | [diff] [blame] | 415 | 'LINK', |
[email protected] | fff920a | 2009-05-08 22:35:32 | [diff] [blame] | 416 | 'CHROME_BUILD_TYPE', |
| 417 | 'CHROMIUM_BUILD', |
| 418 | 'OFFICIAL_BUILD', |
[email protected] | b5e46b9 | 2009-03-26 18:58:10 | [diff] [blame] | 419 | ], |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 420 | 'configurations': { |
| 421 | 'Debug': { |
[email protected] | c5bdc03 | 2009-04-20 19:11:31 | [diff] [blame] | 422 | 'variables': { |
| 423 | 'debug_optimize%': '0', |
| 424 | }, |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 425 | 'defines': [ |
| 426 | '_DEBUG', |
| 427 | ], |
| 428 | 'cflags': [ |
[email protected] | c5bdc03 | 2009-04-20 19:11:31 | [diff] [blame] | 429 | '-O<(debug_optimize)', |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 430 | '-g', |
[email protected] | 9a5d2a5 | 2009-05-22 03:37:45 | [diff] [blame] | 431 | # One can use '-gstabs' to enable building the debugging |
| 432 | # information in STABS format for breakpad's dumpsyms. |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 433 | ], |
[email protected] | 96fd003 | 2009-04-24 00:13:08 | [diff] [blame] | 434 | 'ldflags': [ |
| 435 | '-rdynamic', # Allows backtrace to resolve symbols. |
| 436 | ], |
[email protected] | 5315f284 | 2009-04-28 00:43:27 | [diff] [blame] | 437 | }, |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 438 | 'Release': { |
[email protected] | 740e2de | 2009-07-21 11:41:01 | [diff] [blame] | 439 | 'variables': { |
| 440 | 'release_optimize%': '2', |
[email protected] | 1e81985 | 2009-07-30 17:47:51 | [diff] [blame] | 441 | 'release_extra_cflags%': '', |
[email protected] | 740e2de | 2009-07-21 11:41:01 | [diff] [blame] | 442 | }, |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 443 | 'cflags': [ |
[email protected] | 740e2de | 2009-07-21 11:41:01 | [diff] [blame] | 444 | '-O<(release_optimize)', |
[email protected] | d8cc3a6 | 2009-04-08 18:29:53 | [diff] [blame] | 445 | # Don't emit the GCC version ident directives, they just end up |
| 446 | # in the .comment section taking up binary size. |
| 447 | '-fno-ident', |
| 448 | # Put data and code in their own sections, so that unused symbols |
| 449 | # can be removed at link time with --gc-sections. |
| 450 | '-fdata-sections', |
| 451 | '-ffunction-sections', |
[email protected] | 1e81985 | 2009-07-30 17:47:51 | [diff] [blame] | 452 | '<(release_extra_cflags)', |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 453 | ], |
| 454 | }, |
| 455 | }, |
[email protected] | 601b54022 | 2009-04-03 21:32:04 | [diff] [blame] | 456 | 'variants': { |
| 457 | 'coverage': { |
| 458 | 'cflags': ['-fprofile-arcs', '-ftest-coverage'], |
| 459 | 'ldflags': ['-fprofile-arcs'], |
| 460 | }, |
| 461 | 'profile': { |
| 462 | 'cflags': ['-pg', '-g'], |
| 463 | 'ldflags': ['-pg'], |
| 464 | }, |
| 465 | 'symbols': { |
| 466 | 'cflags': ['-g'], |
| 467 | }, |
| 468 | }, |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 469 | 'conditions': [ |
[email protected] | 7e8eb761 | 2009-07-29 15:56:00 | [diff] [blame] | 470 | [ 'target_arch=="ia32"', { |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 471 | 'asflags': [ |
| 472 | # Needed so that libs with .s files (e.g. libicudata.a) |
| 473 | # are compatible with the general 32-bit-ness. |
| 474 | '-32', |
| 475 | ], |
| 476 | # All floating-point computations on x87 happens in 80-bit |
| 477 | # precision. Because the C and C++ language standards allow |
| 478 | # the compiler to keep the floating-point values in higher |
| 479 | # precision than what's specified in the source and doing so |
| 480 | # is more efficient than constantly rounding up to 64-bit or |
| 481 | # 32-bit precision as specified in the source, the compiler, |
| 482 | # especially in the optimized mode, tries very hard to keep |
| 483 | # values in x87 floating-point stack (in 80-bit precision) |
| 484 | # as long as possible. This has important side effects, that |
| 485 | # the real value used in computation may change depending on |
| 486 | # how the compiler did the optimization - that is, the value |
| 487 | # kept in 80-bit is different than the value rounded down to |
| 488 | # 64-bit or 32-bit. There are possible compiler options to make |
| 489 | # this behavior consistent (e.g. -ffloat-store would keep all |
| 490 | # floating-values in the memory, thus force them to be rounded |
| 491 | # to its original precision) but they have significant runtime |
| 492 | # performance penalty. |
| 493 | # |
| 494 | # -mfpmath=sse -msse2 makes the compiler use SSE instructions |
| 495 | # which keep floating-point values in SSE registers in its |
| 496 | # native precision (32-bit for single precision, and 64-bit for |
| 497 | # double precision values). This means the floating-point value |
| 498 | # used during computation does not change depending on how the |
| 499 | # compiler optimized the code, since the value is always kept |
| 500 | # in its specified precision. |
[email protected] | ffde793 | 2009-05-29 00:39:06 | [diff] [blame] | 501 | 'conditions': [ |
| 502 | ['branding=="Chromium"', { |
| 503 | 'cflags': [ |
| 504 | '-march=pentium4', |
| 505 | '-msse2', |
| 506 | '-mfpmath=sse', |
| 507 | ], |
| 508 | }], |
| 509 | ], |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 510 | 'cflags': [ |
| 511 | '-m32', |
[email protected] | 1c6560af | 2009-07-14 11:02:16 | [diff] [blame] | 512 | ], |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 513 | 'ldflags': [ |
| 514 | '-m32', |
| 515 | ], |
| 516 | }], |
[email protected] | 3dda8a96 | 2009-08-10 18:58:07 | [diff] [blame^] | 517 | ['target_arch=="arm"', { |
| 518 | 'conditions': [ |
| 519 | ['chromeos==1', { |
| 520 | 'cflags': [ |
| 521 | '-march=armv7-a', |
| 522 | '-mtune=cortex-a8', |
| 523 | '-mfpu=vfp', |
| 524 | '-mfloat-abi=softfp', |
| 525 | ], |
| 526 | }], |
| 527 | ], |
| 528 | }], |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 529 | ], |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 530 | }, |
| 531 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 532 | ['OS=="mac"', { |
| 533 | 'target_defaults': { |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 534 | 'variables': { |
| 535 | # This should be 'mac_real_dsym%', but there seems to be a bug |
| 536 | # with % in variables that are intended to be set to different |
| 537 | # values in different targets, like this one. |
| 538 | 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases. |
[email protected] | 64eba22 | 2009-07-14 18:43:42 | [diff] [blame] | 539 | # Release defaults to the Xcode optimization default, this var |
| 540 | # lets you force the value. |
| 541 | 'mac_release_optimization%': 'UNSET' |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 542 | }, |
[email protected] | d92c7c01 | 2009-03-19 19:26:42 | [diff] [blame] | 543 | 'mac_bundle': 0, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 544 | 'xcode_settings': { |
| 545 | 'ALWAYS_SEARCH_USER_PATHS': 'NO', |
| 546 | 'GCC_C_LANGUAGE_STANDARD': 'c99', |
| 547 | 'GCC_CW_ASM_SYNTAX': 'NO', |
[email protected] | 7cf57d17 | 2009-06-03 18:15:22 | [diff] [blame] | 548 | 'GCC_DYNAMIC_NO_PIC': 'NO', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 549 | 'GCC_ENABLE_PASCAL_STRINGS': 'NO', |
| 550 | 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES', |
[email protected] | 793c3d7 | 2009-04-10 15:46:34 | [diff] [blame] | 551 | 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 552 | 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', |
| 553 | 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', |
| 554 | 'GCC_VERSION': '4.2', |
| 555 | 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', |
| 556 | 'MACOSX_DEPLOYMENT_TARGET': '10.5', |
| 557 | 'PREBINDING': 'NO', |
| 558 | 'SDKROOT': 'macosx10.5', |
| 559 | 'USE_HEADERMAP': 'NO', |
| 560 | 'WARNING_CFLAGS': ['-Wall', '-Wendif-labels'], |
[email protected] | b3fb809 | 2009-03-12 19:09:24 | [diff] [blame] | 561 | 'conditions': [ |
| 562 | ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'}, |
| 563 | {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}], |
| 564 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 565 | }, |
| 566 | 'target_conditions': [ |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 567 | ['_type!="static_library"', { |
[email protected] | 5d7dc97 | 2009-04-16 15:30:46 | [diff] [blame] | 568 | 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']}, |
| 569 | }], |
| 570 | ['_mac_bundle', { |
| 571 | 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']}, |
[email protected] | 87fde4a | 2009-02-28 00:50:08 | [diff] [blame] | 572 | }], |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 573 | ['_type=="executable" or _type=="shared_library"', { |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 574 | 'target_conditions': [ |
| 575 | ['mac_real_dsym == 1', { |
| 576 | # To get a real .dSYM bundle produced by dsymutil, set the |
| 577 | # debug information format to dwarf-with-dsym. Since |
| 578 | # strip_from_xcode will not be used, set Xcode to do the |
| 579 | # stripping as well. |
| 580 | 'configurations': { |
| 581 | 'Release': { |
| 582 | 'xcode_settings': { |
| 583 | 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym', |
| 584 | 'DEPLOYMENT_POSTPROCESSING': 'YES', |
| 585 | 'STRIP_INSTALLED_PRODUCT': 'YES', |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 586 | 'target_conditions': [ |
| 587 | ['_type=="shared_library"', { |
| 588 | # The Xcode default is to strip debugging symbols |
| 589 | # only (-S). Local symbols should be stripped as |
| 590 | # well, which will be handled by -x. Xcode will |
| 591 | # continue to insert -S when stripping even when |
| 592 | # additional flags are added with STRIPFLAGS. |
| 593 | 'STRIPFLAGS': '-x', |
| 594 | }], # _type=="shared_library" |
| 595 | ], # target_conditions |
| 596 | }, # xcode_settings |
| 597 | }, # configuration "Release" |
| 598 | }, # configurations |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 599 | }, { # mac_real_dsym != 1 |
| 600 | # To get a fast fake .dSYM bundle, use a post-build step to |
| 601 | # produce the .dSYM and strip the executable. strip_from_xcode |
| 602 | # only operates in the Release configuration. |
| 603 | 'postbuilds': [ |
| 604 | { |
| 605 | 'variables': { |
| 606 | # Define strip_from_xcode in a variable ending in _path |
| 607 | # so that gyp understands it's a path and performs proper |
| 608 | # relativization during dict merging. |
| 609 | 'strip_from_xcode_path': 'mac/strip_from_xcode', |
| 610 | }, |
| 611 | 'postbuild_name': 'Strip If Needed', |
| 612 | 'action': ['<(strip_from_xcode_path)'], |
| 613 | }, |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 614 | ], # postbuilds |
| 615 | }], # mac_real_dsym |
| 616 | ], # target_conditions |
| 617 | }], # _type=="executable" or _type=="shared_library" |
| 618 | ], # target_conditions |
| 619 | }, # target_defaults |
| 620 | }], # OS=="mac" |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 621 | ['OS=="win"', { |
| 622 | 'target_defaults': { |
| 623 | 'defines': [ |
| 624 | '_WIN32_WINNT=0x0600', |
| 625 | 'WINVER=0x0600', |
| 626 | 'WIN32', |
| 627 | '_WINDOWS', |
| 628 | '_HAS_EXCEPTIONS=0', |
| 629 | 'NOMINMAX', |
| 630 | '_CRT_RAND_S', |
| 631 | 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS', |
| 632 | 'WIN32_LEAN_AND_MEAN', |
| 633 | '_SECURE_ATL', |
[email protected] | adfb98c | 2009-06-23 20:08:45 | [diff] [blame] | 634 | '_HAS_TR1=0', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 635 | ], |
[email protected] | 5b5ca7cb | 2009-07-20 23:00:20 | [diff] [blame] | 636 | 'msvs_system_include_dirs': [ |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 637 | '<(DEPTH)/third_party/platformsdk_win2008_6_1/files/Include', |
| 638 | '$(VSInstallDir)/VC/atlmfc/include', |
| 639 | ], |
| 640 | 'msvs_cygwin_dirs': ['../third_party/cygwin'], |
[email protected] | 684056177 | 2009-05-12 16:37:55 | [diff] [blame] | 641 | 'msvs_disabled_warnings': [4396, 4503, 4819], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 642 | 'msvs_settings': { |
| 643 | 'VCCLCompilerTool': { |
| 644 | 'MinimalRebuild': 'false', |
| 645 | 'ExceptionHandling': '0', |
| 646 | 'BufferSecurityCheck': 'true', |
| 647 | 'EnableFunctionLevelLinking': 'true', |
| 648 | 'RuntimeTypeInfo': 'false', |
| 649 | 'WarningLevel': '3', |
| 650 | 'WarnAsError': 'true', |
| 651 | 'DebugInformationFormat': '3', |
[email protected] | 3fef6e6 | 2009-07-31 19:58:58 | [diff] [blame] | 652 | 'conditions': [ |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 653 | [ 'msvs_multi_core_compile', { |
| 654 | 'AdditionalOptions': '/MP', |
| 655 | }], |
[email protected] | 3fef6e6 | 2009-07-31 19:58:58 | [diff] [blame] | 656 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 657 | }, |
| 658 | 'VCLibrarianTool': { |
| 659 | 'AdditionalOptions': '/ignore:4221', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 660 | 'AdditionalLibraryDirectories': |
[email protected] | 07506b50 | 2009-06-29 00:30:51 | [diff] [blame] | 661 | ['<(DEPTH)/third_party/platformsdk_win2008_6_1/files/Lib'], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 662 | }, |
| 663 | 'VCLinkerTool': { |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 664 | 'AdditionalDependencies': [ |
| 665 | 'wininet.lib', |
| 666 | 'version.lib', |
| 667 | 'msimg32.lib', |
| 668 | 'ws2_32.lib', |
| 669 | 'usp10.lib', |
| 670 | 'psapi.lib', |
[email protected] | 96fd003 | 2009-04-24 00:13:08 | [diff] [blame] | 671 | 'dbghelp.lib', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 672 | ], |
| 673 | 'AdditionalLibraryDirectories': |
[email protected] | 07506b50 | 2009-06-29 00:30:51 | [diff] [blame] | 674 | ['<(DEPTH)/third_party/platformsdk_win2008_6_1/files/Lib'], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 675 | 'GenerateDebugInformation': 'true', |
| 676 | 'MapFileName': '$(OutDir)\\$(TargetName).map', |
| 677 | 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib', |
| 678 | 'TargetMachine': '1', |
| 679 | 'FixedBaseAddress': '1', |
[email protected] | 825ff8d | 2009-05-22 01:40:48 | [diff] [blame] | 680 | # SubSystem values: |
| 681 | # 0 == not set |
| 682 | # 1 == /SUBSYSTEM:CONSOLE |
| 683 | # 2 == /SUBSYSTEM:WINDOWS |
| 684 | # Most of the executables we'll ever create are tests |
| 685 | # and utilities with console output. |
| 686 | 'SubSystem': '1', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 687 | }, |
| 688 | 'VCMIDLTool': { |
| 689 | 'GenerateStublessProxies': 'true', |
| 690 | 'TypeLibraryName': '$(InputName).tlb', |
| 691 | 'OutputDirectory': '$(IntDir)', |
| 692 | 'HeaderFileName': '$(InputName).h', |
| 693 | 'DLLDataFileName': 'dlldata.c', |
| 694 | 'InterfaceIdentifierFileName': '$(InputName)_i.c', |
| 695 | 'ProxyFileName': '$(InputName)_p.c', |
| 696 | }, |
| 697 | 'VCResourceCompilerTool': { |
| 698 | 'Culture' : '1033', |
[email protected] | 245b3cd59 | 2009-03-31 01:12:14 | [diff] [blame] | 699 | 'AdditionalIncludeDirectories': ['<(DEPTH)'], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 700 | }, |
| 701 | }, |
| 702 | }, |
| 703 | }], |
| 704 | ['chromium_code==0', { |
| 705 | # This section must follow the other conditon sections above because |
| 706 | # external_code.gypi expects to be merged into those settings. |
| 707 | 'includes': [ |
| 708 | 'external_code.gypi', |
| 709 | ], |
[email protected] | dce5df5 | 2009-06-29 17:58:25 | [diff] [blame] | 710 | }, { |
| 711 | 'target_defaults': { |
| 712 | # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the |
| 713 | # C99 macros on Mac and Linux. |
| 714 | 'defines': [ |
| 715 | '__STDC_FORMAT_MACROS', |
| 716 | ], |
| 717 | }, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 718 | }], |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 719 | ['msvs_use_common_linker_extras', { |
| 720 | 'target_defaults': { |
| 721 | 'msvs_settings': { |
| 722 | 'VCLinkerTool': { |
| 723 | 'AdditionalOptions': |
| 724 | '/safeseh /dynamicbase /ignore:4199 /ignore:4221 /nxcompat', |
| 725 | 'DelayLoadDLLs': [ |
| 726 | 'dbghelp.dll', |
| 727 | 'dwmapi.dll', |
| 728 | 'uxtheme.dll', |
| 729 | ], |
| 730 | }, |
| 731 | }, |
| 732 | }, |
| 733 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 734 | ], |
[email protected] | c13fcbd | 2009-03-27 04:27:01 | [diff] [blame] | 735 | 'scons_settings': { |
| 736 | 'sconsbuild_dir': '<(DEPTH)/sconsbuild', |
[email protected] | a8b56d9 | 2009-08-10 04:09:07 | [diff] [blame] | 737 | 'tools': ['ar', 'as', 'gcc', 'g++', 'gnulink', 'chromium_builders'], |
[email protected] | c13fcbd | 2009-03-27 04:27:01 | [diff] [blame] | 738 | }, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 739 | 'xcode_settings': { |
| 740 | # The Xcode generator will look for an xcode_settings section at the root |
| 741 | # of each dict and use it to apply settings on a file-wide basis. Most |
| 742 | # settings should not be here, they should be in target-specific |
| 743 | # xcode_settings sections, or better yet, should use non-Xcode-specific |
| 744 | # settings in target dicts. SYMROOT is a special case, because many other |
| 745 | # Xcode variables depend on it, including variables such as |
| 746 | # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
| 747 | # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
| 748 | # files to appear (when present) in the UI as actual files and not red |
| 749 | # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
| 750 | # and therefore SYMROOT, needs to be set at the project level. |
[email protected] | bfa24b96 | 2009-03-02 00:16:16 | [diff] [blame] | 751 | 'SYMROOT': '<(DEPTH)/xcodebuild', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 752 | }, |
| 753 | } |