| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 { | 5 { |
| 6 'variables': { | 6 'variables': { |
| 7 # .gyp files should set chromium_code to 1 if they build Chromium-specific | 7 # NaCl's builders often have gold disabled. |
| 8 # code, as opposed to external code. This variable is used to control | 8 # The bfd linker doesn't support --threads. |
| 9 # such things as the set of warnings to enable, and whether warnings are | 9 'linux_use_gold_flags%': 0, |
| 10 # treated as errors. | |
| 11 'chromium_code%': 0, | |
| 12 | 10 |
| 13 # Variables expected to be overriden on the GYP command line (-D) or by | 11 # By default we assume that we are building as part of Chrome |
| 14 # ~/.gyp/include.gypi. | 12 'nacl_standalone%': 0, |
| 15 | 13 |
| 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 # Enable building with ASAN (Clang's -faddress-sanitizer option). | |
| 27 # -faddress-sanitizer only works with clang, but asan=1 implies clang=1 | |
| 28 # See https://sites.google.com/a/chromium.org/dev/developers/testing/address
sanitizer | |
| 29 'asan%': 0, | |
| 30 | |
| 31 # Set this to true when building with Clang. | |
| 32 'clang%': 0, | |
| 33 | |
| 34 # Set to 1 to enable code coverage. In addition to build changes | |
| 35 # (e.g. extra CFLAGS), also creates a new target in the src/chrome | |
| 36 # project file called "coverage". | |
| 37 # Currently ignored on Windows. | |
| 38 'coverage%': 0, | |
| 39 | |
| 40 # TODO(sgk): eliminate this if possible. | |
| 41 # It would be nicer to support this via a setting in 'target_defaults' | |
| 42 # in chrome/app/locales/locales.gypi overriding the setting in the | |
| 43 # 'Debug' configuration in the 'target_defaults' dict below, | |
| 44 # but that doesn't work as we'd like. | |
| 45 'msvs_debug_link_incremental%': '2', | |
| 46 | |
| 47 # NOTE: adapted from them chrome common.gypi file for arm | |
| 48 'armv7%': 0, | |
| 49 | |
| 50 # Set Neon compilation flags (only meaningful if armv7==1). | |
| 51 'arm_neon%': 1, | |
| 52 | |
| 53 # Set Thumb compilation flags. | |
| 54 'arm_thumb%': 0, | |
| 55 | |
| 56 # Set ARM fpu compilation flags (only meaningful if armv7==1 and | |
| 57 # arm_neon==0). | |
| 58 'arm_fpu%': 'vfpv3', | |
| 59 | |
| 60 # Set ARM float abi compilation flag. | |
| 61 'arm_float_abi%': 'softfp', | |
| 62 | |
| 63 # The system root for cross-compiles. Default: none. | |
| 64 'sysroot%': '', | |
| 65 | |
| 66 # NOTE: end adapted from them chrome common.gypi file for arm | |
| 67 | |
| 68 # Doing this in a sub-dict so that it can be referred to below. | |
| 69 'variables': { | |
| 70 # By default we assume that we are building as part of Chrome | |
| 71 'variables': { | |
| 72 'nacl_standalone%': 0, | |
| 73 | |
| 74 # Override branding to select the desired branding flavor. | |
| 75 'branding%': 'Chromium', | |
| 76 | |
| 77 # Override buildtype to select the desired build flavor. | |
| 78 # Dev - everyday build for development/testing | |
| 79 # Official - release build (generally implies additional processing) | |
| 80 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp | |
| 81 # conversion is done), some of the things which are now controlled by | |
| 82 # 'branding', such as symbol generation, will need to be refactored | |
| 83 # based on 'buildtype' (i.e. we don't care about saving symbols for | |
| 84 # non-Official builds). | |
| 85 'buildtype%': 'Dev', | |
| 86 | |
| 87 # To do a shared build on linux we need to be able to choose between | |
| 88 # type static_library and shared_library. We default to doing a static | |
| 89 # build but you can override this with "gyp -Dlibrary=shared_library" | |
| 90 # or you can add the following line (without the #) to | |
| 91 # ~/.gyp/include.gypi {'variables': {'library': 'shared_library'}} | |
| 92 # to compile as shared by default | |
| 93 'library%': 'static_library', | |
| 94 }, | |
| 95 'nacl_standalone%': '<(nacl_standalone)', | |
| 96 # Define branding and buildtype on the basis of their settings within the | |
| 97 # variables sub-dict above, unless overridden. | |
| 98 'branding%': '<(branding)', | |
| 99 'buildtype%': '<(buildtype)', | |
| 100 # Compute the architecture that we're building for. Default to the | |
| 101 # architecture that we're building on. | |
| 102 'conditions': [ | |
| 103 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', { | |
| 104 # This handles the Linux platforms we generally deal with. Anything | |
| 105 # else gets passed through, which probably won't work very well; such | |
| 106 # hosts should pass an explicit target_arch to gyp. | |
| 107 # | |
| 108 # NOTE: currently only nacl is generating gyp files on an arm board. | |
| 109 # The arm.* -> arm substitution in chrome's common.gypi isn't | |
| 110 # appropriate in that context as we actually use target_arch==arm | |
| 111 # to me x86 -> arm cross compile. When actually running on an arm | |
| 112 # board, we'll generate ia32 for now, so that the generation | |
| 113 # succeeds. | |
| 114 'target_arch%': | |
| 115 '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm
.*/ia32/")' | |
| 116 }, { # OS!="linux" | |
| 117 'target_arch%': 'ia32', | |
| 118 }], | |
| 119 ], | |
| 120 | |
| 121 'library%': '<(library)', | |
| 122 | |
| 123 # Variable 'component' is for cases where we would like to build some | |
| 124 # components as dynamic shared libraries but still need variable | |
| 125 # 'library' for static libraries. | |
| 126 # By default, component is set to whatever library is set to and | |
| 127 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi. | |
| 128 'component%': '<(library)', | |
| 129 }, | |
| 130 # These come from the above variable scope. | |
| 131 'target_arch%': '<(target_arch)', | |
| 132 'nacl_standalone%': '<(nacl_standalone)', | |
| 133 'nacl_strict_warnings%': 1, | 14 'nacl_strict_warnings%': 1, |
| 134 'branding%': '<(branding)', | |
| 135 'buildtype%': '<(buildtype)', | |
| 136 'library%': '<(library)', | |
| 137 'component%': '<(component)', | |
| 138 'nacl_validator_ragel%': 0, | 15 'nacl_validator_ragel%': 0, |
| 139 | 16 |
| 140 'linux2%': 0, | 17 'linux2%': 0, |
| 141 'conditions': [ | 18 |
| 142 ['OS=="win"', { | 19 'conditions': [ |
| 143 'python_exe': [ | 20 ['OS=="win"', { |
| 144 'call <(DEPTH)/native_client/tools/win_py.cmd' | 21 'python_exe': [ |
| 145 ], | 22 'call <(DEPTH)/native_client/tools/win_py.cmd' |
| 146 }, { | 23 ], |
| 147 'python_exe': [ | 24 }, { |
| 148 'python' | 25 'python_exe': [ |
| 149 ], | 26 'python' |
| 150 }], | 27 ], |
| 151 ], | 28 }], |
| 29 ], |
| 152 }, | 30 }, |
| 153 | 31 |
| 154 'target_defaults': { | 32 'target_defaults': { |
| 155 'include_dirs': [ | 33 'include_dirs': [ |
| 156 # Putting this first so that people who include "ppapi/..." get the | 34 # Putting this first so that people who include "ppapi/..." get the |
| 157 # third_party version instead of any other version (the chrome location | 35 # third_party version instead of any other version (the chrome location |
| 158 # for instance). | 36 # for instance). |
| 159 '../src/third_party', | 37 '../src/third_party', |
| 160 '../..', | 38 '../..', |
| 161 ], | 39 ], |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 'NACL_TARGET_ARCH=arm', | 88 'NACL_TARGET_ARCH=arm', |
| 211 'NACL_TARGET_SUBARCH=32', | 89 'NACL_TARGET_SUBARCH=32', |
| 212 ], | 90 ], |
| 213 }], | 91 }], |
| 214 ['linux2==1', { | 92 ['linux2==1', { |
| 215 'defines': ['LINUX2=1'], | 93 'defines': ['LINUX2=1'], |
| 216 }], | 94 }], |
| 217 ['OS=="win"', { | 95 ['OS=="win"', { |
| 218 'defines': [ 'NOMINMAX' ] | 96 'defines': [ 'NOMINMAX' ] |
| 219 }], | 97 }], |
| 220 ['coverage!=0', { | |
| 221 'conditions': [ | |
| 222 ['OS=="mac"', { | |
| 223 'xcode_settings': { | |
| 224 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', | |
| 225 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', | |
| 226 }, | |
| 227 # Add -lgcov for executables, not for static_libraries. | |
| 228 # This is a delayed conditional. | |
| 229 'target_conditions': [ | |
| 230 ['_type=="executable"', { | |
| 231 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] }, | |
| 232 }], | |
| 233 ], | |
| 234 }], | |
| 235 # Linux gyp (into scons) doesn't like target_conditions? | |
| 236 # TODO(???): track down why 'target_conditions' doesn't work | |
| 237 # on Linux gyp into scons like it does on Mac gyp into xcodeproj. | |
| 238 ['OS=="linux"', { | |
| 239 'cflags': [ '-ftest-coverage', | |
| 240 '-fprofile-arcs'], | |
| 241 'link_settings': { 'libraries': [ '-lgcov' ] }, | |
| 242 }], | |
| 243 ], | |
| 244 # TODO(jrg): options for code coverage on Windows | |
| 245 }], | |
| 246 ['clang==1', { | |
| 247 'cflags': [ | |
| 248 '-Wheader-hygiene', | |
| 249 # Clang spots more unused functions. | |
| 250 '-Wno-unused-function', | |
| 251 # Don't die on dtoa code that uses a char as an array index. | |
| 252 '-Wno-char-subscripts', | |
| 253 # Especially needed for gtest macros using enum values from Mac | |
| 254 # system headers. | |
| 255 # TODO(pkasting): In C++11 this is legal, so this should be | |
| 256 # removed when we change to that. (This is also why we don't | |
| 257 # bother fixing all these cases today.) | |
| 258 '-Wno-unnamed-type-template-args', | |
| 259 # Allow 'default' label in switch even when all enumeration | |
| 260 # cases have been covered. | |
| 261 '-Wno-covered-switch-default', | |
| 262 # Allow C++11 extensions (for "override") | |
| 263 '-Wno-c++11-extensions', | |
| 264 ], | |
| 265 'cflags!': [ | |
| 266 # Clang doesn't seem to know know this flag. | |
| 267 '-mfpmath=sse', | |
| 268 ], | |
| 269 }], | |
| 270 ], | 98 ], |
| 271 }, | 99 }, |
| 272 'conditions': [ | 100 'conditions': [ |
| 273 ['OS=="linux"', { | 101 ['OS=="linux"', { |
| 274 'target_defaults': { | 102 'target_defaults': { |
| 275 # Enable -Werror by default, but put it in a variable so it can | |
| 276 # be disabled in ~/.gyp/include.gypi on the valgrind builders. | |
| 277 'variables': { | |
| 278 'werror%': '-Werror', | |
| 279 }, | |
| 280 'cflags': [ | |
| 281 '<(werror)', # See note above about the werror variable. | |
| 282 '-pthread', | |
| 283 '-fno-exceptions', | |
| 284 '-Wall', # TODO(bradnelson): why does this disappear?!? | |
| 285 ], | |
| 286 'conditions': [ | |
| 287 ['nacl_standalone==1 and OS=="linux"', { | |
| 288 'cflags': ['-fPIC'], | |
| 289 }], | |
| 290 ['nacl_standalone==1 and nacl_strict_warnings==1', { | |
| 291 # TODO(gregoryd): remove the condition when the issues in | |
| 292 # Chrome code are fixed. | |
| 293 'cflags': [ | |
| 294 # TODO(bradnelson): This was being masked by key naming | |
| 295 # collisions. Track down the items blocking enabling this. | |
| 296 #'-pedantic', | |
| 297 '-Wextra', | |
| 298 '-Wno-long-long', | |
| 299 '-Wswitch-enum', | |
| 300 '-Wsign-compare', | |
| 301 '-Wundef', | |
| 302 ], | |
| 303 }], | |
| 304 [ 'target_arch=="arm"', { | |
| 305 'cflags': [ | |
| 306 '-Wno-abi', | |
| 307 '-fno-exceptions', | |
| 308 '-Wall', | |
| 309 '-fPIC', | |
| 310 '--sysroot=<(sysroot)', | |
| 311 ], | |
| 312 'ldflags': [ | |
| 313 '--sysroot=<(sysroot)', | |
| 314 ], | |
| 315 # TODO(mcgrathr): This is copied from the arm section of | |
| 316 # chromium/src/build/common.gypi, but these details really | |
| 317 # should be more fully harmonized and shared. | |
| 318 'conditions': [ | |
| 319 ['arm_thumb==1', { | |
| 320 'cflags': [ | |
| 321 '-mthumb', | |
| 322 ] | |
| 323 }], | |
| 324 ['armv7==1', { | |
| 325 'cflags': [ | |
| 326 '-march=armv7-a', | |
| 327 '-mtune=cortex-a8', | |
| 328 '-mfloat-abi=<(arm_float_abi)', | |
| 329 ], | |
| 330 'conditions': [ | |
| 331 ['arm_neon==1', { | |
| 332 'cflags': [ '-mfpu=neon', ], | |
| 333 }, { | |
| 334 'cflags': [ '-mfpu=<(arm_fpu)', ], | |
| 335 }] | |
| 336 ], | |
| 337 }], | |
| 338 ], | |
| 339 }, { # else: target_arch != "arm" | |
| 340 'conditions': [ | |
| 341 ['target_arch=="x64"', { | |
| 342 'variables': { | |
| 343 'mbits_flag': '-m64', | |
| 344 }, | |
| 345 }, { | |
| 346 'variables': { | |
| 347 'mbits_flag': '-m32', | |
| 348 } | |
| 349 },], | |
| 350 ], | |
| 351 'asflags': [ | |
| 352 '<(mbits_flag)', | |
| 353 ], | |
| 354 'cflags': [ | |
| 355 '<(mbits_flag)', | |
| 356 '-fno-exceptions', | |
| 357 '-Wall', | |
| 358 ], | |
| 359 'ldflags': [ | |
| 360 '<(mbits_flag)', | |
| 361 ], | |
| 362 }], | |
| 363 ], | |
| 364 'cflags_cc': [ | |
| 365 '-fno-rtti', | |
| 366 '-fno-threadsafe-statics', | |
| 367 ], | |
| 368 'ldflags': [ | |
| 369 '-pthread', | |
| 370 '-Wl,-z,noexecstack', | |
| 371 ], | |
| 372 'defines': [ | 103 'defines': [ |
| 373 'NACL_LINUX=1', | 104 'NACL_LINUX=1', |
| 374 'NACL_OSX=0', | 105 'NACL_OSX=0', |
| 375 'NACL_WINDOWS=0', | 106 'NACL_WINDOWS=0', |
| 376 '_BSD_SOURCE=1', | 107 '_BSD_SOURCE=1', |
| 377 '_POSIX_C_SOURCE=199506', | 108 '_POSIX_C_SOURCE=199506', |
| 378 '_XOPEN_SOURCE=600', | 109 '_XOPEN_SOURCE=600', |
| 379 '_GNU_SOURCE=1', | 110 '_GNU_SOURCE=1', |
| 380 '__STDC_LIMIT_MACROS=1', | 111 '__STDC_LIMIT_MACROS=1', |
| 381 ], | 112 ], |
| 382 'link_settings': { | 113 'link_settings': { |
| 383 'libraries': [ | 114 'libraries': [ |
| 384 '-lrt', | 115 '-lrt', |
| 385 '-lpthread', | |
| 386 ], | 116 ], |
| 387 }, | 117 }, |
| 388 'scons_variable_settings': { | |
| 389 'LIBPATH': ['$LIB_DIR'], | |
| 390 # Linking of large files uses lots of RAM, so serialize links | |
| 391 # using the handy flock command from util-linux. | |
| 392 'FLOCK_LINK': ['flock', '$TOP_BUILDDIR/linker.lock', '$LINK'], | |
| 393 'FLOCK_SHLINK': ['flock', '$TOP_BUILDDIR/linker.lock', '$SHLINK'], | |
| 394 'FLOCK_LDMODULE': ['flock', '$TOP_BUILDDIR/linker.lock', '$LDMODULE'], | |
| 395 | |
| 396 # We have several cases where archives depend on each other in | |
| 397 # a cyclic fashion. Since the GNU linker does only a single | |
| 398 # pass over the archives we surround the libraries with | |
| 399 # --start-group and --end-group (aka -( and -) ). That causes | |
| 400 # ld to loop over the group until no more undefined symbols | |
| 401 # are found. In an ideal world we would only make groups from | |
| 402 # those libraries which we knew to be in cycles. However, | |
| 403 # that's tough with SCons, so we bodge it by making all the | |
| 404 # archives a group by redefining the linking command here. | |
| 405 # | |
| 406 # TODO: investigate whether we still have cycles that | |
| 407 # require --{start,end}-group. There has been a lot of | |
| 408 # refactoring since this was first coded, which might have | |
| 409 # eliminated the circular dependencies. | |
| 410 # | |
| 411 # Note: $_LIBDIRFLAGS comes before ${LINK,SHLINK,LDMODULE}FLAGS | |
| 412 # so that we prefer our own built libraries (e.g. -lpng) to | |
| 413 # system versions of libraries that pkg-config might turn up. | |
| 414 # TODO(sgk): investigate handling this not by re-ordering the | |
| 415 # flags this way, but by adding a hook to use the SCons | |
| 416 # ParseFlags() option on the output from pkg-config. | |
| 417 'LINKCOM': [['$FLOCK_LINK', '-o', '$TARGET', '$_LIBDIRFLAGS', | |
| 418 '$LINKFLAGS', '$SOURCES', '-Wl,--start-group', | |
| 419 '$_LIBFLAGS', '-Wl,--end-group']], | |
| 420 'SHLINKCOM': [['$FLOCK_SHLINK', '-o', '$TARGET', '$_LIBDIRFLAGS', | |
| 421 '$SHLINKFLAGS', '$SOURCES', '-Wl,--start-group', | |
| 422 '$_LIBFLAGS', '-Wl,--end-group']], | |
| 423 'LDMODULECOM': [['$FLOCK_LDMODULE', '-o', '$TARGET', '$_LIBDIRFLAGS', | |
| 424 '$LDMODULEFLAGS', '$SOURCES', '-Wl,--start-group', | |
| 425 '$_LIBFLAGS', '-Wl,--end-group']], | |
| 426 'IMPLICIT_COMMAND_DEPENDENCIES': 0, | |
| 427 # -rpath is only used when building with shared libraries. | |
| 428 'conditions': [ | |
| 429 [ 'library=="shared_library"', { | |
| 430 'RPATH': '$LIB_DIR', | |
| 431 }], | |
| 432 ], | |
| 433 }, | |
| 434 'scons_import_variables': [ | |
| 435 'AS', | |
| 436 'CC', | |
| 437 'CXX', | |
| 438 'LINK', | |
| 439 ], | |
| 440 'scons_propagate_variables': [ | |
| 441 'AS', | |
| 442 'CC', | |
| 443 'CCACHE_DIR', | |
| 444 'CXX', | |
| 445 'DISTCC_DIR', | |
| 446 'DISTCC_HOSTS', | |
| 447 'HOME', | |
| 448 'INCLUDE_SERVER_ARGS', | |
| 449 'INCLUDE_SERVER_PORT', | |
| 450 'LINK', | |
| 451 'CHROME_BUILD_TYPE', | |
| 452 'CHROMIUM_BUILD', | |
| 453 'OFFICIAL_BUILD', | |
| 454 ], | |
| 455 'configurations': { | |
| 456 'Debug': { | |
| 457 'variables': { | |
| 458 'debug_optimize%': '0', | |
| 459 }, | |
| 460 'defines': [ | |
| 461 '_DEBUG', | |
| 462 ], | |
| 463 'cflags': [ | |
| 464 '-O<(debug_optimize)', | |
| 465 '-g', | |
| 466 # One can use '-gstabs' to enable building the debugging | |
| 467 # information in STABS format for breakpad's dumpsyms. | |
| 468 ], | |
| 469 'ldflags': [ | |
| 470 '-rdynamic', # Allows backtrace to resolve symbols. | |
| 471 ], | |
| 472 }, | |
| 473 'Release': { | |
| 474 'variables': { | |
| 475 'release_optimize%': '2', | |
| 476 }, | |
| 477 'cflags': [ | |
| 478 '-O<(release_optimize)', | |
| 479 # Don't emit the GCC version ident directives, they just end up | |
| 480 # in the .comment section taking up binary size. | |
| 481 '-fno-ident', | |
| 482 # Put data and code in their own sections, so that unused symbols | |
| 483 # can be removed at link time with --gc-sections. | |
| 484 '-fdata-sections', | |
| 485 '-ffunction-sections', | |
| 486 ], | |
| 487 'conditions': [ | |
| 488 ['clang==1', { | |
| 489 'cflags!': [ | |
| 490 '-fno-ident', | |
| 491 ], | |
| 492 }], | |
| 493 ], | |
| 494 }, | |
| 495 }, | |
| 496 'variants': { | |
| 497 'coverage': { | |
| 498 'cflags': ['-fprofile-arcs', '-ftest-coverage'], | |
| 499 'ldflags': ['-fprofile-arcs'], | |
| 500 }, | |
| 501 'profile': { | |
| 502 'cflags': ['-pg', '-g'], | |
| 503 'ldflags': ['-pg'], | |
| 504 }, | |
| 505 'symbols': { | |
| 506 'cflags': ['-g'], | |
| 507 }, | |
| 508 }, | |
| 509 }, | 118 }, |
| 510 }], | 119 }], |
| 511 ['OS=="mac"', { | 120 ['OS=="mac"', { |
| 512 'target_defaults': { | 121 'target_defaults': { |
| 513 'variables': { | |
| 514 # This should be 'mac_real_dsym%', but there seems to be a bug | |
| 515 # with % in variables that are intended to be set to different | |
| 516 # values in different targets, like this one. | |
| 517 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases. | |
| 518 }, | |
| 519 'mac_bundle': 0, | |
| 520 'xcode_settings': { | |
| 521 'ALWAYS_SEARCH_USER_PATHS': 'NO', | |
| 522 'GCC_C_LANGUAGE_STANDARD': 'gnu99', | |
| 523 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks | |
| 524 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic | |
| 525 # (Equivalent to -fPIC) | |
| 526 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions | |
| 527 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti | |
| 528 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings | |
| 529 'GCC_INLINES_ARE_PRIVATE_EXTERN': | |
| 530 'YES', # -fvisibility-inlines-hidden | |
| 531 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors | |
| 532 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden | |
| 533 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics | |
| 534 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror | |
| 535 # Don't set GCC_VERSION so that we default to /usr/bin/gcc | |
| 536 #'GCC_VERSION': '4.2', | |
| 537 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof | |
| 538 'PREBINDING': 'NO', # No -Wl,-prebind | |
| 539 'USE_HEADERMAP': 'NO', | |
| 540 # TODO(bradnelson): -Werror ?!? | |
| 541 'WARNING_CFLAGS': ['-Wall', '-Wendif-labels', '-Wno-long-long'], | |
| 542 'conditions': [ | |
| 543 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'}, | |
| 544 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}], | |
| 545 ['clang==1', { | |
| 546 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang', | |
| 547 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++', | |
| 548 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', | |
| 549 'WARNING_CFLAGS': [ | |
| 550 '-Wheader-hygiene', | |
| 551 # Don't die on dtoa code that uses a char as an array index. | |
| 552 # This is required solely for base/third_party/dmg_fp/dtoa.cc. | |
| 553 '-Wno-char-subscripts', | |
| 554 # Clang spots more unused functions. | |
| 555 '-Wno-unused-function', | |
| 556 # See comments on this flag higher up in this file. | |
| 557 '-Wno-unnamed-type-template-args', | |
| 558 # Allow 'default' label in switch even when all enumeration | |
| 559 # cases have been covered. | |
| 560 '-Wno-covered-switch-default', | |
| 561 # Allow C++11 extensions (for "override") | |
| 562 '-Wno-c++11-extensions', | |
| 563 # TODO(thakis): Reenable once the one instance this warns on | |
| 564 # is fixed. | |
| 565 '-Wno-parentheses', | |
| 566 ], | |
| 567 }], | |
| 568 ['nacl_standalone==1', { | |
| 569 # If part of the Chromium build, use the Chromium default. | |
| 570 # Otherwise, when building standalone, use this. | |
| 571 'MACOSX_DEPLOYMENT_TARGET': '10.5', # -mmacosx-version-min=10.5 | |
| 572 'SDKROOT': 'macosx10.5', # -isysroot | |
| 573 }], | |
| 574 ], | |
| 575 }, | |
| 576 'conditions': [ | |
| 577 ['clang==1', { | |
| 578 'variables': { | |
| 579 'clang_dir': | |
| 580 '<(DEPTH)/third_party/llvm-build/Release+Asserts/bin', | |
| 581 }, | |
| 582 }], | |
| 583 ['nacl_standalone==1 and nacl_strict_warnings==1', { | |
| 584 'xcode_settings': { | |
| 585 # TODO(gregoryd): remove the condition when the issues in | |
| 586 # Chrome code are fixed. | |
| 587 'WARNING_CFLAGS': [ | |
| 588 '-pedantic', | |
| 589 '-Wextra', | |
| 590 '-Wno-long-long', | |
| 591 '-Wswitch-enum', | |
| 592 '-Wsign-compare', | |
| 593 '-Wundef', | |
| 594 ], | |
| 595 }, | |
| 596 }], | |
| 597 ['nacl_standalone==1', { | |
| 598 'target_conditions': [ | |
| 599 ['_type!="static_library"', { | |
| 600 'xcode_settings': { | |
| 601 'OTHER_LDFLAGS': ['-Wl,-search_paths_first']}, | |
| 602 }], | |
| 603 ['_mac_bundle', { | |
| 604 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']}, | |
| 605 }], | |
| 606 ['_type=="executable"', { | |
| 607 'target_conditions': [ | |
| 608 ['mac_real_dsym == 1', { | |
| 609 # To get a real .dSYM bundle produced by dsymutil, set the | |
| 610 # debug information format to dwarf-with-dsym. Since | |
| 611 # strip_from_xcode will not be used, set Xcode to do the | |
| 612 # stripping as well. | |
| 613 'configurations': { | |
| 614 'Release': { | |
| 615 'xcode_settings': { | |
| 616 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym', | |
| 617 'DEPLOYMENT_POSTPROCESSING': 'YES', | |
| 618 'STRIP_INSTALLED_PRODUCT': 'YES', | |
| 619 }, | |
| 620 }, | |
| 621 }, | |
| 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_xc
ode | |
| 625 # only operates in the Release configuration. | |
| 626 'postbuilds': [ | |
| 627 { | |
| 628 'variables': { | |
| 629 # Define strip_from_xcode in a variable ending in _pat
h | |
| 630 # so that gyp understands it's a path and performs pro
per | |
| 631 # relativization during dict merging. | |
| 632 'strip_from_xcode_path': | |
| 633 '../../build/mac/strip_from_xcode', | |
| 634 }, | |
| 635 'postbuild_name': 'Strip If Needed', | |
| 636 'action': ['<(strip_from_xcode_path)'], | |
| 637 }, | |
| 638 ], | |
| 639 }], | |
| 640 ], | |
| 641 }], | |
| 642 ], | |
| 643 }], | |
| 644 ], | |
| 645 'defines': [ | 122 'defines': [ |
| 646 'NACL_LINUX=0', | 123 'NACL_LINUX=0', |
| 647 'NACL_OSX=1', | 124 'NACL_OSX=1', |
| 648 'NACL_WINDOWS=0', | 125 'NACL_WINDOWS=0', |
| 649 ], | 126 ], |
| 650 }, | 127 }, |
| 651 }], | 128 }], |
| 652 ['OS=="win"', { | 129 ['OS=="win"', { |
| 653 'target_defaults': { | 130 'target_defaults': { |
| 654 'variables': { | 131 'variables': { |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 'defines': [ | 184 'defines': [ |
| 708 '_HAS_EXCEPTIONS=0', | 185 '_HAS_EXCEPTIONS=0', |
| 709 ], | 186 ], |
| 710 }], | 187 }], |
| 711 ['MSVS_VERSION=="2008"', { | 188 ['MSVS_VERSION=="2008"', { |
| 712 'defines': [ | 189 'defines': [ |
| 713 '_HAS_TR1=0', | 190 '_HAS_TR1=0', |
| 714 ], | 191 ], |
| 715 }], | 192 }], |
| 716 ], | 193 ], |
| 717 'msvs_system_include_dirs': [ | |
| 718 '<(DEPTH)/third_party/platformsdk_win7/files/Include', | |
| 719 ], | |
| 720 'msvs_cygwin_dirs': ['../third_party/cygwin'], | |
| 721 # TODO(bsy) remove 4355 once cross-repo | 194 # TODO(bsy) remove 4355 once cross-repo |
| 722 # NACL_ALLOW_THIS_IN_INITIALIZER_LIST changes go in. | 195 # NACL_ALLOW_THIS_IN_INITIALIZER_LIST changes go in. |
| 723 'msvs_disabled_warnings': [4355, 4396, 4503, 4800, 4819], | 196 'msvs_disabled_warnings': [4355, 4396, 4503, 4800, 4819], |
| 724 'msvs_settings': { | |
| 725 'VCCLCompilerTool': { | |
| 726 'MinimalRebuild': 'false', | |
| 727 'BufferSecurityCheck': 'true', | |
| 728 'EnableFunctionLevelLinking': 'true', | |
| 729 'RuntimeTypeInfo': 'false', | |
| 730 'WarningLevel': '3', | |
| 731 'WarnAsError': 'true', | |
| 732 'DebugInformationFormat': '3', | |
| 733 | |
| 734 'conditions': [ | |
| 735 ['component=="shared_library"', { | |
| 736 'ExceptionHandling': '1', # /EHsc | |
| 737 }, { | |
| 738 'ExceptionHandling': '0', | |
| 739 }], | |
| 740 ], | |
| 741 }, | |
| 742 'VCLibrarianTool': { | |
| 743 'AdditionalOptions': ['/ignore:4221'], | |
| 744 'AdditionalLibraryDirectories': | |
| 745 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'], | |
| 746 }, | |
| 747 'VCLinkerTool': { | |
| 748 'AdditionalOptions': [ | |
| 749 '/safeseh:NO', | |
| 750 '/dynamicbase:NO', | |
| 751 '/ignore:4199', | |
| 752 '/ignore:4221', | |
| 753 '/nxcompat', | |
| 754 ], | |
| 755 'AdditionalDependencies': [ | |
| 756 'wininet.lib', | |
| 757 'version.lib', | |
| 758 'msimg32.lib', | |
| 759 'ws2_32.lib', | |
| 760 'usp10.lib', | |
| 761 'psapi.lib', | |
| 762 'dbghelp.lib', | |
| 763 ], | |
| 764 'AdditionalLibraryDirectories': | |
| 765 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'], | |
| 766 'DelayLoadDLLs': [ | |
| 767 'dbghelp.dll', | |
| 768 'dwmapi.dll', | |
| 769 'uxtheme.dll', | |
| 770 ], | |
| 771 'GenerateDebugInformation': 'true', | |
| 772 'MapFileName': '$(OutDir)\\$(TargetName).map', | |
| 773 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib', | |
| 774 'TargetMachine': '1', | |
| 775 'FixedBaseAddress': '1', | |
| 776 # SubSystem values: | |
| 777 # 0 == not set | |
| 778 # 1 == /SUBSYSTEM:CONSOLE | |
| 779 # 2 == /SUBSYSTEM:WINDOWS | |
| 780 # Most of the executables we'll ever create are tests | |
| 781 # and utilities with console output. | |
| 782 'SubSystem': '1', | |
| 783 }, | |
| 784 'VCMIDLTool': { | |
| 785 'GenerateStublessProxies': 'true', | |
| 786 'TypeLibraryName': '$(InputName).tlb', | |
| 787 'OutputDirectory': '$(IntDir)', | |
| 788 'HeaderFileName': '$(InputName).h', | |
| 789 'DLLDataFileName': 'dlldata.c', | |
| 790 'InterfaceIdentifierFileName': '$(InputName)_i.c', | |
| 791 'ProxyFileName': '$(InputName)_p.c', | |
| 792 }, | |
| 793 'VCResourceCompilerTool': { | |
| 794 'Culture' : '1033', | |
| 795 'AdditionalIncludeDirectories': ['<(DEPTH)'], | |
| 796 }, | |
| 797 }, | |
| 798 }, | 197 }, |
| 799 }], | 198 }], |
| 800 ['chromium_code==0 and nacl_standalone==0', { | |
| 801 # This section must follow the other conditon sections above because | |
| 802 # external_code.gypi expects to be merged into those settings. | |
| 803 'includes': [ | |
| 804 'external_code.gypi', | |
| 805 ], | |
| 806 }, { | |
| 807 'target_defaults': { | |
| 808 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the | |
| 809 # C99 macros on Mac and Linux. | |
| 810 'defines': [ | |
| 811 '__STDC_FORMAT_MACROS', | |
| 812 ], | |
| 813 'msvs_settings': { | |
| 814 'VCCLCompilerTool': { | |
| 815 'Detect64BitPortabilityProblems': 'false', | |
| 816 # TODO(new_hire): above line should go away | |
| 817 }, | |
| 818 }, | |
| 819 }, | |
| 820 }], | |
| 821 ['clang==1 and nacl_standalone==1', { | |
| 822 'make_global_settings': [ | |
| 823 ['CC', 'third_party/llvm-build/Release+Asserts/bin/clang'], | |
| 824 ['CXX', 'third_party/llvm-build/Release+Asserts/bin/clang++'], | |
| 825 ['LINK', '$(CXX)'], | |
| 826 ['CC.host', '$(CC)'], | |
| 827 ['CXX.host', '$(CXX)'], | |
| 828 ['LINK.host', '$(LINK)'], | |
| 829 ], | |
| 830 }], | |
| 831 ], | 199 ], |
| 832 'scons_settings': { | |
| 833 'sconsbuild_dir': '<(DEPTH)/sconsbuild', | |
| 834 }, | |
| 835 'xcode_settings': { | |
| 836 # The Xcode generator will look for an xcode_settings section at the root | |
| 837 # of each dict and use it to apply settings on a file-wide basis. Most | |
| 838 # settings should not be here, they should be in target-specific | |
| 839 # xcode_settings sections, or better yet, should use non-Xcode-specific | |
| 840 # settings in target dicts. SYMROOT is a special case, because many other | |
| 841 # Xcode variables depend on it, including variables such as | |
| 842 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | |
| 843 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the | |
| 844 # files to appear (when present) in the UI as actual files and not red | |
| 845 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, | |
| 846 # and therefore SYMROOT, needs to be set at the project level. | |
| 847 'SYMROOT': '<(DEPTH)/xcodebuild', | |
| 848 }, | |
| 849 'includes': [ | 200 'includes': [ |
| 850 'untrusted.gypi', | 201 'untrusted.gypi', |
| 851 ], | 202 ], |
| 852 } | 203 } |
| OLD | NEW |