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