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 # IMPORTANT: | 5 # IMPORTANT: |
6 # Please don't directly include this file if you are building via gyp_chromium, | 6 # Please don't directly include this file if you are building via gyp_chromium, |
7 # since gyp_chromium is automatically forcing its inclusion. | 7 # since gyp_chromium is automatically forcing its inclusion. |
8 { | 8 { |
9 # Variables expected to be overriden on the GYP command line (-D) or by | 9 # Variables expected to be overriden on the GYP command line (-D) or by |
10 # ~/.gyp/include.gypi. | 10 # ~/.gyp/include.gypi. |
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
625 'enable_load_completion_hacks%': 1, | 625 'enable_load_completion_hacks%': 1, |
626 | 626 |
627 # Automatically select platforms under ozone. Turn this off to | 627 # Automatically select platforms under ozone. Turn this off to |
628 # build only explicitly selected platforms. | 628 # build only explicitly selected platforms. |
629 'ozone_auto_platforms%': 1, | 629 'ozone_auto_platforms%': 1, |
630 | 630 |
631 # If this is set clang is used as host compiler, but not as target | 631 # If this is set clang is used as host compiler, but not as target |
632 # compiler. Always do this by default. | 632 # compiler. Always do this by default. |
633 'host_clang%': 1, | 633 'host_clang%': 1, |
634 | 634 |
635 # Link-Time Optimizations | |
636 # crbug.com/407544 | |
637 'use_lto%': 0, | |
638 # Enable LTO on code compiled with -O2. | |
639 # Do not merge both options as that will result with the whole | |
tomhudson
2014/10/13 16:41:11
Not quite clear to me reading this what "merge bot
Fabrice (no longer in Chrome)
2014/10/14 14:58:55
Do not use both options at the same time, I fail a
| |
640 # code being optimized with -O2 due to the way LTO merges optimization | |
641 # flags at link-time. | |
642 'use_lto_o2%': 0, | |
643 | |
635 'conditions': [ | 644 'conditions': [ |
636 # A flag for POSIX platforms | 645 # A flag for POSIX platforms |
637 ['OS=="win"', { | 646 ['OS=="win"', { |
638 'os_posix%': 0, | 647 'os_posix%': 0, |
639 }, { | 648 }, { |
640 'os_posix%': 1, | 649 'os_posix%': 1, |
641 }], | 650 }], |
642 | 651 |
643 # A flag for BSD platforms | 652 # A flag for BSD platforms |
644 ['OS=="freebsd" or OS=="openbsd"', { | 653 ['OS=="freebsd" or OS=="openbsd"', { |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1172 'spdy_proxy_auth_property%': '<(spdy_proxy_auth_property)', | 1181 'spdy_proxy_auth_property%': '<(spdy_proxy_auth_property)', |
1173 'spdy_proxy_auth_value%': '<(spdy_proxy_auth_value)', | 1182 'spdy_proxy_auth_value%': '<(spdy_proxy_auth_value)', |
1174 'enable_mdns%' : '<(enable_mdns)', | 1183 'enable_mdns%' : '<(enable_mdns)', |
1175 'enable_service_discovery%' : '<(enable_service_discovery)', | 1184 'enable_service_discovery%' : '<(enable_service_discovery)', |
1176 'enable_wifi_bootstrapping%': '<(enable_wifi_bootstrapping)', | 1185 'enable_wifi_bootstrapping%': '<(enable_wifi_bootstrapping)', |
1177 'enable_hangout_services_extension%' : '<(enable_hangout_services_extension) ', | 1186 'enable_hangout_services_extension%' : '<(enable_hangout_services_extension) ', |
1178 'v8_optimized_debug%': '<(v8_optimized_debug)', | 1187 'v8_optimized_debug%': '<(v8_optimized_debug)', |
1179 'proprietary_codecs%': '<(proprietary_codecs)', | 1188 'proprietary_codecs%': '<(proprietary_codecs)', |
1180 'use_goma%': '<(use_goma)', | 1189 'use_goma%': '<(use_goma)', |
1181 'gomadir%': '<(gomadir)', | 1190 'gomadir%': '<(gomadir)', |
1191 'use_lto%': '<(use_lto)', | |
1192 'use_lto_o2%': '<use_lto_o2', | |
1182 'video_hole%': '<(video_hole)', | 1193 'video_hole%': '<(video_hole)', |
1183 'enable_load_completion_hacks%': '<(enable_load_completion_hacks)', | 1194 'enable_load_completion_hacks%': '<(enable_load_completion_hacks)', |
1184 'support_pre_M6_history_database%': '<(support_pre_M6_history_database)', | 1195 'support_pre_M6_history_database%': '<(support_pre_M6_history_database)', |
1185 | 1196 |
1186 # Whether or not we are building the Athena shell. | 1197 # Whether or not we are building the Athena shell. |
1187 'use_athena%': '0', | 1198 'use_athena%': '0', |
1188 | 1199 |
1189 # Use system protobuf instead of bundled one. | 1200 # Use system protobuf instead of bundled one. |
1190 'use_system_protobuf%': 0, | 1201 'use_system_protobuf%': 0, |
1191 | 1202 |
(...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2296 # Do not disable seccomp_bpf anywhere without talking to | 2307 # Do not disable seccomp_bpf anywhere without talking to |
2297 # security@chromium.org! | 2308 # security@chromium.org! |
2298 ['((OS=="linux" or OS=="android") and ' | 2309 ['((OS=="linux" or OS=="android") and ' |
2299 '(target_arch=="ia32" or target_arch=="x64" or ' | 2310 '(target_arch=="ia32" or target_arch=="x64" or ' |
2300 'target_arch=="arm" or target_arch=="mipsel" or ' | 2311 'target_arch=="arm" or target_arch=="mipsel" or ' |
2301 'target_arch=="arm64"))', { | 2312 'target_arch=="arm64"))', { |
2302 'use_seccomp_bpf%': 1, | 2313 'use_seccomp_bpf%': 1, |
2303 }, { | 2314 }, { |
2304 'use_seccomp_bpf%': 0, | 2315 'use_seccomp_bpf%': 0, |
2305 }], | 2316 }], |
2317 # Set component build with LTO until all tests pass. | |
tomhudson
2014/10/13 16:41:11
"Until all tests pass" - does this mean they don't
Fabrice (no longer in Chrome)
2014/10/14 14:58:55
Yes, there are many code generation and link bugs
| |
2318 # This also reduces link time. | |
2319 ['use_lto==1', { | |
2320 'component%': "shared_library", | |
2321 }], | |
2306 ], | 2322 ], |
2307 | 2323 |
2308 # older history files use fts2 instead of fts3 | 2324 # older history files use fts2 instead of fts3 |
2309 'sqlite_enable_fts2%': '<(support_pre_M6_history_database)', | 2325 'sqlite_enable_fts2%': '<(support_pre_M6_history_database)', |
2310 | 2326 |
2311 # The path to the ANGLE library. | 2327 # The path to the ANGLE library. |
2312 'angle_path': '<(DEPTH)/third_party/angle', | 2328 'angle_path': '<(DEPTH)/third_party/angle', |
2313 | 2329 |
2314 # List of default apps to install in new profiles. The first list contains | 2330 # List of default apps to install in new profiles. The first list contains |
2315 # the source files as found in svn. The second list, used only for linux, | 2331 # the source files as found in svn. The second list, used only for linux, |
(...skipping 1422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3738 '-target arm-linux-gnueabihf', | 3754 '-target arm-linux-gnueabihf', |
3739 ], | 3755 ], |
3740 'ldflags': [ | 3756 'ldflags': [ |
3741 '-target arm-linux-gnueabihf', | 3757 '-target arm-linux-gnueabihf', |
3742 ], | 3758 ], |
3743 }], | 3759 }], |
3744 ['arm_arch!=""', { | 3760 ['arm_arch!=""', { |
3745 'cflags': [ | 3761 'cflags': [ |
3746 '-march=<(arm_arch)', | 3762 '-march=<(arm_arch)', |
3747 ], | 3763 ], |
3764 'conditions': [ | |
3765 ['use_lto==1 or use_lto_o2==1', { | |
3766 'ldflags': [ | |
3767 '-march=<(arm_arch)', | |
3768 ], | |
3769 }], | |
3770 ], | |
3748 }], | 3771 }], |
3749 ['clang==1 and OS!="android"', { | 3772 ['clang==1 and OS!="android"', { |
3750 'cflags': [ | 3773 'cflags': [ |
3751 # We need to disable clang's builtin assembler as it can't | 3774 # We need to disable clang's builtin assembler as it can't |
3752 # handle several asm files, crbug.com/124610 | 3775 # handle several asm files, crbug.com/124610 |
3753 '-no-integrated-as', | 3776 '-no-integrated-as', |
3754 ], | 3777 ], |
3755 }], | 3778 }], |
3756 ['arm_tune!=""', { | 3779 ['arm_tune!=""', { |
3757 'cflags': [ | 3780 'cflags': [ |
3758 '-mtune=<(arm_tune)', | 3781 '-mtune=<(arm_tune)', |
3759 ], | 3782 ], |
3783 'conditions': [ | |
3784 ['use_lto==1 or use_lto_o2==1', { | |
3785 'ldflags': [ | |
3786 '-mtune=<(arm_tune)', | |
3787 ], | |
3788 }], | |
3789 ], | |
3760 }], | 3790 }], |
3761 ['arm_fpu!=""', { | 3791 ['arm_fpu!=""', { |
3762 'cflags': [ | 3792 'cflags': [ |
3763 '-mfpu=<(arm_fpu)', | 3793 '-mfpu=<(arm_fpu)', |
3764 ], | 3794 ], |
3795 'conditions': [ | |
3796 ['use_lto==1 or use_lto_o2==1', { | |
3797 'ldflags': [ | |
3798 '-mfpu=<(arm_fpu)', | |
3799 ], | |
3800 }], | |
3801 ], | |
3765 }], | 3802 }], |
3766 ['arm_float_abi!=""', { | 3803 ['arm_float_abi!=""', { |
3767 'cflags': [ | 3804 'cflags': [ |
3768 '-mfloat-abi=<(arm_float_abi)', | 3805 '-mfloat-abi=<(arm_float_abi)', |
3769 ], | 3806 ], |
3807 'conditions': [ | |
3808 ['use_lto==1 or use_lto_o2==1', { | |
3809 'ldflags': [ | |
3810 '-mfloat-abi=<(arm_float_abi)', | |
3811 ], | |
3812 }], | |
3813 ], | |
3770 }], | 3814 }], |
3771 ['arm_thumb==1', { | 3815 ['arm_thumb==1', { |
3772 'cflags': [ | 3816 'cflags': [ |
3773 '-mthumb', | 3817 '-mthumb', |
3774 ], | 3818 ], |
3819 'conditions': [ | |
3820 ['use_lto==1 or use_lto_o2==1', { | |
3821 'ldflags': [ | |
3822 '-mthumb', | |
3823 ], | |
3824 }], | |
3825 ], | |
3775 }], | 3826 }], |
3776 ['OS=="android"', { | 3827 ['OS=="android"', { |
3777 # Most of the following flags are derived from what Android | 3828 # Most of the following flags are derived from what Android |
3778 # uses by default when building for arm, reference for which | 3829 # uses by default when building for arm, reference for which |
3779 # can be found in the following file in the Android NDK: | 3830 # can be found in the following file in the Android NDK: |
3780 # toolchains/arm-linux-androideabi-4.9/setup.mk | 3831 # toolchains/arm-linux-androideabi-4.9/setup.mk |
3781 'cflags': [ | 3832 'cflags': [ |
3782 # The tree-sra optimization (scalar replacement for | 3833 # The tree-sra optimization (scalar replacement for |
3783 # aggregates enabling subsequent optimizations) leads to | 3834 # aggregates enabling subsequent optimizations) leads to |
3784 # invalid code generation when using the Android NDK's | 3835 # invalid code generation when using the Android NDK's |
(...skipping 1874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5659 # make generator doesn't support CC_wrapper without CC | 5710 # make generator doesn't support CC_wrapper without CC |
5660 # in make_global_settings yet. | 5711 # in make_global_settings yet. |
5661 ['use_goma==1 and ("<(GENERATOR)"=="ninja" or clang==1)', { | 5712 ['use_goma==1 and ("<(GENERATOR)"=="ninja" or clang==1)', { |
5662 'make_global_settings': [ | 5713 'make_global_settings': [ |
5663 ['CC_wrapper', '<(gomadir)/gomacc'], | 5714 ['CC_wrapper', '<(gomadir)/gomacc'], |
5664 ['CXX_wrapper', '<(gomadir)/gomacc'], | 5715 ['CXX_wrapper', '<(gomadir)/gomacc'], |
5665 ['CC.host_wrapper', '<(gomadir)/gomacc'], | 5716 ['CC.host_wrapper', '<(gomadir)/gomacc'], |
5666 ['CXX.host_wrapper', '<(gomadir)/gomacc'], | 5717 ['CXX.host_wrapper', '<(gomadir)/gomacc'], |
5667 ], | 5718 ], |
5668 }], | 5719 }], |
5720 ['use_lto==1', { | |
5721 'target_defaults': { | |
5722 'target_conditions': [ | |
5723 ['_toolset=="target"', { | |
5724 'cflags': [ | |
5725 '-flto', | |
5726 '-ffat-lto-objects', | |
5727 ], | |
5728 }], | |
5729 ], | |
5730 }, | |
5731 }], | |
5732 ['use_lto==1 or use_lto_o2==1', { | |
5733 'target_defaults': { | |
5734 'target_conditions': [ | |
5735 ['_toolset=="target"', { | |
5736 'ldflags': [ | |
5737 '-flto=32', | |
5738 ], | |
5739 }], | |
5740 ], | |
5741 }, | |
5742 }], | |
5669 ], | 5743 ], |
5670 'xcode_settings': { | 5744 'xcode_settings': { |
5671 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT! | 5745 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT! |
5672 # This block adds *project-wide* configuration settings to each project | 5746 # This block adds *project-wide* configuration settings to each project |
5673 # file. It's almost always wrong to put things here. Specify your | 5747 # file. It's almost always wrong to put things here. Specify your |
5674 # custom xcode_settings in target_defaults to add them to targets instead. | 5748 # custom xcode_settings in target_defaults to add them to targets instead. |
5675 | 5749 |
5676 'conditions': [ | 5750 'conditions': [ |
5677 # In an Xcode Project Info window, the "Base SDK for All Configurations" | 5751 # In an Xcode Project Info window, the "Base SDK for All Configurations" |
5678 # setting sets the SDK on a project-wide basis. In order to get the | 5752 # setting sets the SDK on a project-wide basis. In order to get the |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5729 # settings in target dicts. SYMROOT is a special case, because many other | 5803 # settings in target dicts. SYMROOT is a special case, because many other |
5730 # Xcode variables depend on it, including variables such as | 5804 # Xcode variables depend on it, including variables such as |
5731 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | 5805 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
5732 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the | 5806 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
5733 # files to appear (when present) in the UI as actual files and not red | 5807 # files to appear (when present) in the UI as actual files and not red |
5734 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, | 5808 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
5735 # and therefore SYMROOT, needs to be set at the project level. | 5809 # and therefore SYMROOT, needs to be set at the project level. |
5736 'SYMROOT': '<(DEPTH)/xcodebuild', | 5810 'SYMROOT': '<(DEPTH)/xcodebuild', |
5737 }, | 5811 }, |
5738 } | 5812 } |
OLD | NEW |