| OLD | NEW |
| 1 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | 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 | 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 # .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 | 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 | 9 # such things as the set of warnings to enable, and whether warnings are |
| 10 # treated as errors. | 10 # treated as errors. |
| 11 'chromium_code%': 0, | 11 'chromium_code%': 0, |
| 12 | 12 |
| 13 # Variables expected to be overriden on the GYP command line (-D) or by | 13 # Variables expected to be overriden on the GYP command line (-D) or by |
| 14 # ~/.gyp/include.gypi. | 14 # ~/.gyp/include.gypi. |
| 15 | 15 |
| 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 |
| 16 # Override chromium_mac_pch and set it to 0 to suppress the use of | 41 # 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 | 42 # precompiled headers on the Mac. Prefix header injection may still be |
| 18 # used, but prefix headers will not be precompiled. This is useful when | 43 # 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 | 44 # using distcc to distribute a build to compile slaves that don't |
| 20 # share the same compiler executable as the system driving the compilation, | 45 # share the same compiler executable as the system driving the compilation, |
| 21 # because precompiled headers rely on pointers into a specific compiler | 46 # because precompiled headers rely on pointers into a specific compiler |
| 22 # executable's image. Setting this to 0 is needed to use an experimental | 47 # executable's image. Setting this to 0 is needed to use an experimental |
| 23 # Linux-Mac cross compiler distcc farm. | 48 # Linux-Mac cross compiler distcc farm. |
| 24 'chromium_mac_pch%': 1, | 49 'chromium_mac_pch%': 1, |
| 25 | 50 |
| 26 # Override branding to select the desired branding flavor. | |
| 27 'branding%': 'Chromium', | |
| 28 | |
| 29 # Override buildtype to select the desired build flavor. | |
| 30 # Dev - everyday build for development/testing | |
| 31 # Official - release build (generally implies additional processing) | |
| 32 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp | |
| 33 # conversion is done), some of the things which are now controlled by | |
| 34 # 'branding', such as symbol generation, will need to be refactored based | |
| 35 # on 'buildtype' (i.e. we don't care about saving symbols for non-Official | |
| 36 # builds). | |
| 37 'buildtype%': 'Dev', | |
| 38 | |
| 39 # Set to 1 to enable code coverage. In addition to build changes | 51 # Set to 1 to enable code coverage. In addition to build changes |
| 40 # (e.g. extra CFLAGS), also creates a new target in the src/chrome | 52 # (e.g. extra CFLAGS), also creates a new target in the src/chrome |
| 41 # project file called "coverage". | 53 # project file called "coverage". |
| 42 # Currently ignored on Windows. | 54 # Currently ignored on Windows. |
| 43 'coverage%': 0, | 55 'coverage%': 0, |
| 44 | 56 |
| 45 # Overridable specification for potential use of alternative | 57 # Overridable specification for potential use of alternative |
| 46 # JavaScript engines. | 58 # JavaScript engines. |
| 47 'javascript_engine%': 'v8', | 59 'javascript_engine%': 'v8', |
| 48 | 60 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 # sandbox the zygote process and, thus, all renderer processes. | 109 # sandbox the zygote process and, thus, all renderer processes. |
| 98 'linux_sandbox_path%': '', | 110 'linux_sandbox_path%': '', |
| 99 | 111 |
| 100 # If |linux_suid_sandbox_restrictions|, above, is 'Path' then only a single | 112 # If |linux_suid_sandbox_restrictions|, above, is 'Path' then only a single |
| 101 # path is allowed to be exec'ed by the sandbox for security reasons. That | 113 # path is allowed to be exec'ed by the sandbox for security reasons. That |
| 102 # path is set here. It should be the final location of the Chromium binary | 114 # path is set here. It should be the final location of the Chromium binary |
| 103 # on the system. | 115 # on the system. |
| 104 'linux_sandbox_chrome_path%': '/opt/google/chrome/chrome', | 116 'linux_sandbox_chrome_path%': '/opt/google/chrome/chrome', |
| 105 | 117 |
| 106 'conditions': [ | 118 'conditions': [ |
| 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" |
| 107 # Whether to use multiple cores to compile with visual studio. This is | 144 # Whether to use multiple cores to compile with visual studio. This is |
| 108 # optional because it sometimes causes corruption on VS 2005. | 145 # optional because it sometimes causes corruption on VS 2005. |
| 109 # It is on by default on VS 2008 and off on VS 2005. | 146 # It is on by default on VS 2008 and off on VS 2005. |
| 110 ['OS=="win"', { | 147 ['OS=="win"', { |
| 111 'conditions': [ | 148 'conditions': [ |
| 112 ['MSVS_VERSION=="2005"', { | 149 ['MSVS_VERSION=="2005"', { |
| 113 'msvs_multi_core_compile%': 0, | 150 'msvs_multi_core_compile%': 0, |
| 114 },{ | 151 },{ |
| 115 'msvs_multi_core_compile%': 1, | 152 'msvs_multi_core_compile%': 1, |
| 116 }], | 153 }], |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}], | 544 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}], |
| 508 ], | 545 ], |
| 509 }, | 546 }, |
| 510 'target_conditions': [ | 547 'target_conditions': [ |
| 511 ['_type!="static_library"', { | 548 ['_type!="static_library"', { |
| 512 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']}, | 549 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']}, |
| 513 }], | 550 }], |
| 514 ['_mac_bundle', { | 551 ['_mac_bundle', { |
| 515 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']}, | 552 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']}, |
| 516 }], | 553 }], |
| 517 ['_type=="executable"', { | 554 ['_type=="executable" or _type=="shared_library"', { |
| 518 'target_conditions': [ | 555 'target_conditions': [ |
| 519 ['mac_real_dsym == 1', { | 556 ['mac_real_dsym == 1', { |
| 520 # To get a real .dSYM bundle produced by dsymutil, set the | 557 # To get a real .dSYM bundle produced by dsymutil, set the |
| 521 # debug information format to dwarf-with-dsym. Since | 558 # debug information format to dwarf-with-dsym. Since |
| 522 # strip_from_xcode will not be used, set Xcode to do the | 559 # strip_from_xcode will not be used, set Xcode to do the |
| 523 # stripping as well. | 560 # stripping as well. |
| 524 'configurations': { | 561 'configurations': { |
| 525 'Release': { | 562 'Release': { |
| 526 'xcode_settings': { | 563 'xcode_settings': { |
| 527 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym', | 564 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym', |
| 528 'DEPLOYMENT_POSTPROCESSING': 'YES', | 565 'DEPLOYMENT_POSTPROCESSING': 'YES', |
| 529 'STRIP_INSTALLED_PRODUCT': 'YES', | 566 'STRIP_INSTALLED_PRODUCT': 'YES', |
| 530 }, | 567 'target_conditions': [ |
| 531 }, | 568 ['_type=="shared_library"', { |
| 532 }, | 569 # The Xcode default is to strip debugging symbols |
| 570 # only (-S). Local symbols should be stripped as |
| 571 # well, which will be handled by -x. Xcode will |
| 572 # continue to insert -S when stripping even when |
| 573 # additional flags are added with STRIPFLAGS. |
| 574 'STRIPFLAGS': '-x', |
| 575 }], # _type=="shared_library" |
| 576 ], # target_conditions |
| 577 }, # xcode_settings |
| 578 }, # configuration "Release" |
| 579 }, # configurations |
| 533 }, { # mac_real_dsym != 1 | 580 }, { # mac_real_dsym != 1 |
| 534 # To get a fast fake .dSYM bundle, use a post-build step to | 581 # To get a fast fake .dSYM bundle, use a post-build step to |
| 535 # produce the .dSYM and strip the executable. strip_from_xcode | 582 # produce the .dSYM and strip the executable. strip_from_xcode |
| 536 # only operates in the Release configuration. | 583 # only operates in the Release configuration. |
| 537 'postbuilds': [ | 584 'postbuilds': [ |
| 538 { | 585 { |
| 539 'variables': { | 586 'variables': { |
| 540 # Define strip_from_xcode in a variable ending in _path | 587 # Define strip_from_xcode in a variable ending in _path |
| 541 # so that gyp understands it's a path and performs proper | 588 # so that gyp understands it's a path and performs proper |
| 542 # relativization during dict merging. | 589 # relativization during dict merging. |
| 543 'strip_from_xcode_path': 'mac/strip_from_xcode', | 590 'strip_from_xcode_path': 'mac/strip_from_xcode', |
| 544 }, | 591 }, |
| 545 'postbuild_name': 'Strip If Needed', | 592 'postbuild_name': 'Strip If Needed', |
| 546 'action': ['<(strip_from_xcode_path)'], | 593 'action': ['<(strip_from_xcode_path)'], |
| 547 }, | 594 }, |
| 548 ], | 595 ], # postbuilds |
| 549 }], | 596 }], # mac_real_dsym |
| 550 ], | 597 ], # target_conditions |
| 551 }], | 598 }], # _type=="executable" or _type=="shared_library" |
| 552 ], | 599 ], # target_conditions |
| 553 }, | 600 }, # target_defaults |
| 554 }], | 601 }], # OS=="mac" |
| 555 ['OS=="win"', { | 602 ['OS=="win"', { |
| 556 'target_defaults': { | 603 'target_defaults': { |
| 557 'defines': [ | 604 'defines': [ |
| 558 '_WIN32_WINNT=0x0600', | 605 '_WIN32_WINNT=0x0600', |
| 559 'WINVER=0x0600', | 606 'WINVER=0x0600', |
| 560 'WIN32', | 607 'WIN32', |
| 561 '_WINDOWS', | 608 '_WINDOWS', |
| 562 '_HAS_EXCEPTIONS=0', | 609 '_HAS_EXCEPTIONS=0', |
| 563 'NOMINMAX', | 610 'NOMINMAX', |
| 564 '_CRT_RAND_S', | 611 '_CRT_RAND_S', |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 # settings in target dicts. SYMROOT is a special case, because many other | 724 # settings in target dicts. SYMROOT is a special case, because many other |
| 678 # Xcode variables depend on it, including variables such as | 725 # Xcode variables depend on it, including variables such as |
| 679 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | 726 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
| 680 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the | 727 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
| 681 # files to appear (when present) in the UI as actual files and not red | 728 # files to appear (when present) in the UI as actual files and not red |
| 682 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, | 729 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
| 683 # and therefore SYMROOT, needs to be set at the project level. | 730 # and therefore SYMROOT, needs to be set at the project level. |
| 684 'SYMROOT': '<(DEPTH)/xcodebuild', | 731 'SYMROOT': '<(DEPTH)/xcodebuild', |
| 685 }, | 732 }, |
| 686 } | 733 } |
| OLD | NEW |