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 1528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1539 }, { | 1539 }, { |
1540 'binutils_version%': 0, | 1540 'binutils_version%': 0, |
1541 }], | 1541 }], |
1542 # The version of GCC in use, set later in platforms that use GCC and have | 1542 # The version of GCC in use, set later in platforms that use GCC and have |
1543 # not explicitly chosen to build with clang. Currently, this means all | 1543 # not explicitly chosen to build with clang. Currently, this means all |
1544 # platforms except Windows, Mac and iOS. | 1544 # platforms except Windows, Mac and iOS. |
1545 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so that | 1545 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so that |
1546 # it takes effect here. | 1546 # it takes effect here. |
1547 ['os_posix==1 and OS!="mac" and OS!="ios" and clang==0 and asan==0 and lsa n==0 and tsan==0 and msan==0 and ubsan_vptr==0', { | 1547 ['os_posix==1 and OS!="mac" and OS!="ios" and clang==0 and asan==0 and lsa n==0 and tsan==0 and msan==0 and ubsan_vptr==0', { |
1548 'conditions': [ | 1548 'conditions': [ |
1549 ['OS=="android"', { | 1549 ['OS=="android" and android_webview_build==0', { |
1550 # We directly set the gcc versions since we know what we use. | 1550 'host_gcc_version%': '<!pymod_do_main(compiler_version host compiler )', |
1551 'gcc_version%': 48, | 1551 # We directly set the gcc version since we know what we use. |
1552 }, { | 1552 'gcc_version%': 49, |
1553 'gcc_version%': '<!pymod_do_main(compiler_version target compiler)', | |
1554 }], | 1553 }], |
1555 ['android_webview_build==1', { | 1554 ['OS=="android" and android_webview_build==1', { |
1556 # Android WebView uses a hermetic clang toolchain for host builds. | 1555 # Android WebView uses a hermetic clang toolchain for host builds. |
1557 'host_gcc_version%': 0, | 1556 'host_gcc_version%': 0, |
1558 }, { # android_webview_build!=1 | 1557 # Android WebView uses the GCC toolchain from the Android build. |
1558 'gcc_version%': 48, | |
1559 }], | |
1560 ['OS!="android"', { | |
1559 'host_gcc_version%': '<!pymod_do_main(compiler_version host compiler )', | 1561 'host_gcc_version%': '<!pymod_do_main(compiler_version host compiler )', |
1562 'gcc_version%': '<!pymod_do_main(compiler_version target compiler)', | |
1560 }], | 1563 }], |
1561 ], | 1564 ], |
1562 }, { | 1565 }, { |
1563 'host_gcc_version%': 0, | 1566 'host_gcc_version%': 0, |
1564 'gcc_version%': 0, | 1567 'gcc_version%': 0, |
1565 }], | 1568 }], |
1566 ['OS=="win" and "<!pymod_do_main(dir_exists <(windows_sdk_default_path))"= ="True"', { | 1569 ['OS=="win" and "<!pymod_do_main(dir_exists <(windows_sdk_default_path))"= ="True"', { |
1567 'windows_sdk_path%': '<(windows_sdk_default_path)', | 1570 'windows_sdk_path%': '<(windows_sdk_default_path)', |
1568 }, { | 1571 }, { |
1569 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0', | 1572 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0', |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1680 | 1683 |
1681 # Android API level 14 is ICS (Android 4.0) which is the minimum | 1684 # Android API level 14 is ICS (Android 4.0) which is the minimum |
1682 # platform requirement for Chrome on Android, we use it for native | 1685 # platform requirement for Chrome on Android, we use it for native |
1683 # code compilation. | 1686 # code compilation. |
1684 'conditions': [ | 1687 'conditions': [ |
1685 ['target_arch == "ia32"', { | 1688 ['target_arch == "ia32"', { |
1686 'android_app_abi%': 'x86', | 1689 'android_app_abi%': 'x86', |
1687 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gd bserver/gdbserver', | 1690 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gd bserver/gdbserver', |
1688 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/ arch-x86', | 1691 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/ arch-x86', |
1689 'android_ndk_lib_dir%': 'usr/lib', | 1692 'android_ndk_lib_dir%': 'usr/lib', |
1690 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.8/preb uilt/<(host_os)-<(android_host_arch)/bin', | 1693 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.9/preb uilt/<(host_os)-<(android_host_arch)/bin', |
1691 }], | 1694 }], |
1692 ['target_arch == "x64"', { | 1695 ['target_arch == "x64"', { |
1693 'android_app_abi%': 'x86_64', | 1696 'android_app_abi%': 'x86_64', |
1694 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86_64 /gdbserver/gdbserver', | 1697 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86_64 /gdbserver/gdbserver', |
1695 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-L/a rch-x86_64', | 1698 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-L/a rch-x86_64', |
1696 'android_ndk_lib_dir%': 'usr/lib64', | 1699 'android_ndk_lib_dir%': 'usr/lib64', |
1697 'android_toolchain%': '<(android_ndk_root)/toolchains/x86_64-4.9/p rebuilt/<(host_os)-<(android_host_arch)/bin', | 1700 'android_toolchain%': '<(android_ndk_root)/toolchains/x86_64-4.9/p rebuilt/<(host_os)-<(android_host_arch)/bin', |
1698 }], | 1701 }], |
1699 ['target_arch=="arm"', { | 1702 ['target_arch=="arm"', { |
1700 'conditions': [ | 1703 'conditions': [ |
1701 ['arm_version<7', { | 1704 ['arm_version<7', { |
1702 'android_app_abi%': 'armeabi', | 1705 'android_app_abi%': 'armeabi', |
1703 }, { | 1706 }, { |
1704 'android_app_abi%': 'armeabi-v7a', | 1707 'android_app_abi%': 'armeabi-v7a', |
1705 }], | 1708 }], |
1706 ], | 1709 ], |
1707 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gd bserver/gdbserver', | 1710 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gd bserver/gdbserver', |
1708 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/ arch-arm', | 1711 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/ arch-arm', |
1709 'android_ndk_lib_dir%': 'usr/lib', | 1712 'android_ndk_lib_dir%': 'usr/lib', |
1710 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-an droideabi-4.8/prebuilt/<(host_os)-<(android_host_arch)/bin', | 1713 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-an droideabi-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin', |
1711 }], | 1714 }], |
1712 ['target_arch == "arm64"', { | 1715 ['target_arch == "arm64"', { |
1713 'android_app_abi%': 'arm64-v8a', | 1716 'android_app_abi%': 'arm64-v8a', |
1714 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm64/ gdbserver/gdbserver', | 1717 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm64/ gdbserver/gdbserver', |
1715 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-L/a rch-arm64', | 1718 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-L/a rch-arm64', |
1716 'android_ndk_lib_dir%': 'usr/lib', | 1719 'android_ndk_lib_dir%': 'usr/lib', |
1717 'android_toolchain%': '<(android_ndk_root)/toolchains/aarch64-linu x-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin', | 1720 'android_toolchain%': '<(android_ndk_root)/toolchains/aarch64-linu x-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin', |
1718 }], | 1721 }], |
1719 ['target_arch == "mipsel"', { | 1722 ['target_arch == "mipsel"', { |
1720 'android_app_abi%': 'mips', | 1723 'android_app_abi%': 'mips', |
1721 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips/g dbserver/gdbserver', | 1724 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips/g dbserver/gdbserver', |
1722 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/ arch-mips', | 1725 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/ arch-mips', |
1723 'android_ndk_lib_dir%': 'usr/lib', | 1726 'android_ndk_lib_dir%': 'usr/lib', |
1724 'android_toolchain%': '<(android_ndk_root)/toolchains/mipsel-linux -android-4.8/prebuilt/<(host_os)-<(android_host_arch)/bin', | 1727 'android_toolchain%': '<(android_ndk_root)/toolchains/mipsel-linux -android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin', |
1725 }], | 1728 }], |
1726 ['target_arch == "mips64el"', { | 1729 ['target_arch == "mips64el"', { |
1727 'android_app_abi%': 'mips64', | 1730 'android_app_abi%': 'mips64', |
1728 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips64 /gdbserver/gdbserver', | 1731 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips64 /gdbserver/gdbserver', |
1729 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-L/a rch-mips64', | 1732 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-L/a rch-mips64', |
1730 'android_ndk_lib_dir%': 'usr/lib64', | 1733 'android_ndk_lib_dir%': 'usr/lib64', |
1731 'android_toolchain%': '<(android_ndk_root)/toolchains/mips64el-lin ux-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin', | 1734 'android_toolchain%': '<(android_ndk_root)/toolchains/mips64el-lin ux-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin', |
1732 'gcc_version%': 49, | 1735 'gcc_version%': 49, |
1733 }], | 1736 }], |
1734 ], | 1737 ], |
(...skipping 2071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3806 '-mfpu=<(arm_fpu)', | 3809 '-mfpu=<(arm_fpu)', |
3807 ], | 3810 ], |
3808 }], | 3811 }], |
3809 ['arm_float_abi!=""', { | 3812 ['arm_float_abi!=""', { |
3810 'cflags': [ | 3813 'cflags': [ |
3811 '-mfloat-abi=<(arm_float_abi)', | 3814 '-mfloat-abi=<(arm_float_abi)', |
3812 ], | 3815 ], |
3813 }], | 3816 }], |
3814 ['arm_thumb==1', { | 3817 ['arm_thumb==1', { |
3815 'cflags': [ | 3818 'cflags': [ |
3816 '-mthumb', | 3819 '-mthumb', |
3817 ] | 3820 ], |
3818 }], | 3821 }], |
3819 ['OS=="android"', { | 3822 ['OS=="android"', { |
3820 # Most of the following flags are derived from what Android | 3823 # Most of the following flags are derived from what Android |
3821 # uses by default when building for arm, reference for which | 3824 # uses by default when building for arm, reference for which |
3822 # can be found in the following file in the Android NDK: | 3825 # can be found in the following file in the Android NDK: |
3823 # toolchains/arm-linux-androideabi-4.8/setup.mk | 3826 # toolchains/arm-linux-androideabi-4.9/setup.mk |
3824 'cflags': [ | 3827 'cflags': [ |
3825 # The tree-sra optimization (scalar replacement for | 3828 # The tree-sra optimization (scalar replacement for |
3826 # aggregates enabling subsequent optimizations) leads to | 3829 # aggregates enabling subsequent optimizations) leads to |
3827 # invalid code generation when using the Android NDK's | 3830 # invalid code generation when using the Android NDK's |
3828 # compiler (r5-r7). This can be verified using | 3831 # compiler (r5-r7). This can be verified using |
3829 # webkit_unit_tests' WTF.Checked_int8_t test. | 3832 # webkit_unit_tests' WTF.Checked_int8_t test. |
3830 '-fno-tree-sra', | 3833 '-fno-tree-sra', |
3831 # The following 6 options are disabled to save on | 3834 # The following option is disabled to improve binary |
3832 # binary size in gcc 4.8. | 3835 # size and performance in gcc 4.9. |
Torne
2014/09/09 11:58:13
Removing all these -fno-* flags appears to have br
| |
3833 # TODO(fdegans) Reevaluate when we upgrade GCC. | |
3834 '-fno-partial-inlining', | |
3835 '-fno-early-inlining', | |
3836 '-fno-tree-copy-prop', | |
3837 '-fno-tree-loop-optimize', | |
3838 '-fno-move-loop-invariants', | |
3839 '-fno-caller-saves', | 3836 '-fno-caller-saves', |
3840 '-Wno-psabi', | 3837 '-Wno-psabi', |
3841 ], | 3838 ], |
3842 # Android now supports .relro sections properly. | 3839 # Android now supports .relro sections properly. |
3843 # NOTE: While these flags enable the generation of .relro | 3840 # NOTE: While these flags enable the generation of .relro |
3844 # sections, the generated libraries can still be loaded on | 3841 # sections, the generated libraries can still be loaded on |
3845 # older Android platform versions. | 3842 # older Android platform versions. |
3846 'ldflags': [ | 3843 'ldflags': [ |
3847 '-Wl,-z,relro', | 3844 '-Wl,-z,relro', |
3848 '-Wl,-z,now', | 3845 '-Wl,-z,now', |
(...skipping 16 matching lines...) Expand all Loading... | |
3865 'cflags!': [ | 3862 'cflags!': [ |
3866 '-fomit-frame-pointer', | 3863 '-fomit-frame-pointer', |
3867 ], | 3864 ], |
3868 }], | 3865 }], |
3869 ['clang==1', { | 3866 ['clang==1', { |
3870 'cflags!': [ | 3867 'cflags!': [ |
3871 # Clang does not support the following options. | 3868 # Clang does not support the following options. |
3872 '-mthumb-interwork', | 3869 '-mthumb-interwork', |
3873 '-finline-limit=64', | 3870 '-finline-limit=64', |
3874 '-fno-tree-sra', | 3871 '-fno-tree-sra', |
3875 '-fno-partial-inlining', | |
3876 '-fno-early-inlining', | |
3877 '-fno-tree-copy-prop', | |
3878 '-fno-tree-loop-optimize', | |
3879 '-fno-move-loop-invariants', | |
3880 '-fno-caller-saves', | 3872 '-fno-caller-saves', |
3881 '-Wno-psabi', | 3873 '-Wno-psabi', |
3882 ], | 3874 ], |
3883 'cflags': [ | 3875 'cflags': [ |
3884 # TODO(hans) Enable integrated-as (crbug.com/124610). | 3876 # TODO(hans) Enable integrated-as (crbug.com/124610). |
3885 '-no-integrated-as', | 3877 '-no-integrated-as', |
3886 '-B<(android_toolchain)', # Else /usr/bin/as gets pic ked up. | 3878 '-B<(android_toolchain)', # Else /usr/bin/as gets pic ked up. |
3887 ], | 3879 ], |
3888 'ldflags': [ | 3880 'ldflags': [ |
3889 # Let clang find the ld.gold in the NDK. | 3881 # Let clang find the ld.gold in the NDK. |
(...skipping 1727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5617 }, | 5609 }, |
5618 }], | 5610 }], |
5619 ['enable_new_npdevice_api==1', { | 5611 ['enable_new_npdevice_api==1', { |
5620 'target_defaults': { | 5612 'target_defaults': { |
5621 'defines': [ | 5613 'defines': [ |
5622 'ENABLE_NEW_NPDEVICE_API', | 5614 'ENABLE_NEW_NPDEVICE_API', |
5623 ], | 5615 ], |
5624 }, | 5616 }, |
5625 }], | 5617 }], |
5626 # Don't warn about the "typedef 'foo' locally defined but not used" | 5618 # Don't warn about the "typedef 'foo' locally defined but not used" |
5627 # for gcc 4.8. | 5619 # for gcc 4.8 and higher. |
5628 # TODO: remove this flag once all builds work. See crbug.com/227506 | 5620 # TODO: remove this flag once all builds work. See crbug.com/227506 |
5629 ['gcc_version>=48 and clang==0', { | 5621 ['gcc_version>=48 and clang==0', { |
5630 'target_defaults': { | 5622 'target_defaults': { |
5631 'cflags': [ | 5623 'cflags': [ |
5632 '-Wno-unused-local-typedefs', | 5624 '-Wno-unused-local-typedefs', |
5633 ], | 5625 ], |
5634 }, | 5626 }, |
5635 }], | 5627 }], |
5636 ['gcc_version>=48 and clang==0 and host_clang==1', { | 5628 ['gcc_version>=48 and clang==0 and host_clang==1', { |
5637 'target_defaults': { | 5629 'target_defaults': { |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5772 # settings in target dicts. SYMROOT is a special case, because many other | 5764 # settings in target dicts. SYMROOT is a special case, because many other |
5773 # Xcode variables depend on it, including variables such as | 5765 # Xcode variables depend on it, including variables such as |
5774 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | 5766 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
5775 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the | 5767 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
5776 # files to appear (when present) in the UI as actual files and not red | 5768 # files to appear (when present) in the UI as actual files and not red |
5777 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, | 5769 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
5778 # and therefore SYMROOT, needs to be set at the project level. | 5770 # and therefore SYMROOT, needs to be set at the project level. |
5779 'SYMROOT': '<(DEPTH)/xcodebuild', | 5771 'SYMROOT': '<(DEPTH)/xcodebuild', |
5780 }, | 5772 }, |
5781 } | 5773 } |
OLD | NEW |