Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(762)

Side by Side Diff: build/common.gypi

Issue 375483003: Change Android toolchain to GCC 4.9. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove workaround for MIPS Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after
1493 }], 1493 }],
1494 # The version of GCC in use, set later in platforms that use GCC and have 1494 # The version of GCC in use, set later in platforms that use GCC and have
1495 # not explicitly chosen to build with clang. Currently, this means all 1495 # not explicitly chosen to build with clang. Currently, this means all
1496 # platforms except Windows, Mac and iOS. 1496 # platforms except Windows, Mac and iOS.
1497 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so that 1497 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so that
1498 # it takes effect here. 1498 # it takes effect here.
1499 ['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', { 1499 ['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', {
1500 'conditions': [ 1500 'conditions': [
1501 ['OS=="android"', { 1501 ['OS=="android"', {
1502 # We directly set the gcc versions since we know what we use. 1502 # We directly set the gcc versions since we know what we use.
1503 'gcc_version%': 48, 1503 'gcc_version%': 49,
1504 }, { 1504 }, {
1505 'gcc_version%': '<!pymod_do_main(compiler_version target compiler)', 1505 'gcc_version%': '<!pymod_do_main(compiler_version target compiler)',
1506 }], 1506 }],
1507 ['android_webview_build==1', { 1507 ['android_webview_build==1', {
1508 # Android WebView uses a hermetic toolchain even for host, so set it 1508 # Android WebView uses a hermetic toolchain even for host, so set it
1509 # manually here. 1509 # manually here.
1510 'conditions': [ 1510 'conditions': [
1511 ['host_os=="mac"', { 1511 ['host_os=="mac"', {
1512 'host_gcc_version%': 42, 1512 'host_gcc_version%': 42,
1513 }, { # linux 1513 }, { # linux
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
1639 1639
1640 # Android API level 14 is ICS (Android 4.0) which is the minimum 1640 # Android API level 14 is ICS (Android 4.0) which is the minimum
1641 # platform requirement for Chrome on Android, we use it for native 1641 # platform requirement for Chrome on Android, we use it for native
1642 # code compilation. 1642 # code compilation.
1643 'conditions': [ 1643 'conditions': [
1644 ['target_arch == "ia32"', { 1644 ['target_arch == "ia32"', {
1645 'android_app_abi%': 'x86', 1645 'android_app_abi%': 'x86',
1646 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gd bserver/gdbserver', 1646 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gd bserver/gdbserver',
1647 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/ arch-x86', 1647 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/ arch-x86',
1648 'android_ndk_lib_dir%': 'usr/lib', 1648 'android_ndk_lib_dir%': 'usr/lib',
1649 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.8/preb uilt/<(host_os)-<(android_host_arch)/bin', 1649 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.9/preb uilt/<(host_os)-<(android_host_arch)/bin',
1650 }], 1650 }],
1651 ['target_arch == "x64"', { 1651 ['target_arch == "x64"', {
1652 'android_app_abi%': 'x86_64', 1652 'android_app_abi%': 'x86_64',
1653 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86_64 /gdbserver/gdbserver', 1653 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86_64 /gdbserver/gdbserver',
1654 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-L/a rch-x86_64', 1654 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-L/a rch-x86_64',
1655 'android_ndk_lib_dir%': 'usr/lib64', 1655 'android_ndk_lib_dir%': 'usr/lib64',
1656 'android_toolchain%': '<(android_ndk_root)/toolchains/x86_64-4.9/p rebuilt/<(host_os)-<(android_host_arch)/bin', 1656 'android_toolchain%': '<(android_ndk_root)/toolchains/x86_64-4.9/p rebuilt/<(host_os)-<(android_host_arch)/bin',
1657 }], 1657 }],
1658 ['target_arch=="arm"', { 1658 ['target_arch=="arm"', {
1659 'conditions': [ 1659 'conditions': [
1660 ['arm_version<7', { 1660 ['arm_version<7', {
1661 'android_app_abi%': 'armeabi', 1661 'android_app_abi%': 'armeabi',
1662 }, { 1662 }, {
1663 'android_app_abi%': 'armeabi-v7a', 1663 'android_app_abi%': 'armeabi-v7a',
1664 }], 1664 }],
1665 ], 1665 ],
1666 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gd bserver/gdbserver', 1666 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gd bserver/gdbserver',
1667 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/ arch-arm', 1667 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/ arch-arm',
1668 'android_ndk_lib_dir%': 'usr/lib', 1668 'android_ndk_lib_dir%': 'usr/lib',
1669 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-an droideabi-4.8/prebuilt/<(host_os)-<(android_host_arch)/bin', 1669 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-an droideabi-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin',
1670 }], 1670 }],
1671 ['target_arch == "arm64"', { 1671 ['target_arch == "arm64"', {
1672 'android_app_abi%': 'arm64-v8a', 1672 'android_app_abi%': 'arm64-v8a',
1673 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm64/ gdbserver/gdbserver', 1673 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm64/ gdbserver/gdbserver',
1674 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-L/a rch-arm64', 1674 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-L/a rch-arm64',
1675 'android_ndk_lib_dir%': 'usr/lib', 1675 'android_ndk_lib_dir%': 'usr/lib',
1676 'android_toolchain%': '<(android_ndk_root)/toolchains/aarch64-linu x-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin', 1676 'android_toolchain%': '<(android_ndk_root)/toolchains/aarch64-linu x-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin',
1677 }], 1677 }],
1678 ['target_arch == "mipsel"', { 1678 ['target_arch == "mipsel"', {
1679 'android_app_abi%': 'mips', 1679 'android_app_abi%': 'mips',
1680 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips/g dbserver/gdbserver', 1680 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips/g dbserver/gdbserver',
1681 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/ arch-mips', 1681 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/ arch-mips',
1682 'android_ndk_lib_dir%': 'usr/lib', 1682 'android_ndk_lib_dir%': 'usr/lib',
1683 'android_toolchain%': '<(android_ndk_root)/toolchains/mipsel-linux -android-4.8/prebuilt/<(host_os)-<(android_host_arch)/bin', 1683 'android_toolchain%': '<(android_ndk_root)/toolchains/mipsel-linux -android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin',
1684 }], 1684 }],
1685 ], 1685 ],
1686 }, 1686 },
1687 # Copy conditionally-set variables out one scope. 1687 # Copy conditionally-set variables out one scope.
1688 'android_app_abi%': '<(android_app_abi)', 1688 'android_app_abi%': '<(android_app_abi)',
1689 'android_gdbserver%': '<(android_gdbserver)', 1689 'android_gdbserver%': '<(android_gdbserver)',
1690 'android_ndk_root%': '<(android_ndk_root)', 1690 'android_ndk_root%': '<(android_ndk_root)',
1691 'android_ndk_sysroot%': '<(android_ndk_sysroot)', 1691 'android_ndk_sysroot%': '<(android_ndk_sysroot)',
1692 'android_sdk_root%': '<(android_sdk_root)', 1692 'android_sdk_root%': '<(android_sdk_root)',
1693 'android_sdk_version%': '<(android_sdk_version)', 1693 'android_sdk_version%': '<(android_sdk_version)',
(...skipping 1997 matching lines...) Expand 10 before | Expand all | Expand 10 after
3691 '-mfpu=<(arm_fpu)', 3691 '-mfpu=<(arm_fpu)',
3692 ], 3692 ],
3693 }], 3693 }],
3694 ['arm_float_abi!=""', { 3694 ['arm_float_abi!=""', {
3695 'cflags': [ 3695 'cflags': [
3696 '-mfloat-abi=<(arm_float_abi)', 3696 '-mfloat-abi=<(arm_float_abi)',
3697 ], 3697 ],
3698 }], 3698 }],
3699 ['arm_thumb==1', { 3699 ['arm_thumb==1', {
3700 'cflags': [ 3700 'cflags': [
3701 '-mthumb', 3701 '-mthumb',
3702 ] 3702 ],
3703 }], 3703 }],
3704 ['OS=="android"', { 3704 ['OS=="android"', {
3705 # Most of the following flags are derived from what Android 3705 # Most of the following flags are derived from what Android
3706 # uses by default when building for arm, reference for which 3706 # uses by default when building for arm, reference for which
3707 # can be found in the following file in the Android NDK: 3707 # can be found in the following file in the Android NDK:
3708 # toolchains/arm-linux-androideabi-4.8/setup.mk 3708 # toolchains/arm-linux-androideabi-4.9/setup.mk
3709 'cflags': [ 3709 'cflags': [
3710 # The tree-sra optimization (scalar replacement for 3710 # The tree-sra optimization (scalar replacement for
3711 # aggregates enabling subsequent optimizations) leads to 3711 # aggregates enabling subsequent optimizations) leads to
3712 # invalid code generation when using the Android NDK's 3712 # invalid code generation when using the Android NDK's
3713 # compiler (r5-r7). This can be verified using 3713 # compiler (r5-r7). This can be verified using
3714 # webkit_unit_tests' WTF.Checked_int8_t test. 3714 # webkit_unit_tests' WTF.Checked_int8_t test.
3715 '-fno-tree-sra', 3715 '-fno-tree-sra',
3716 # The following 6 options are disabled to save on 3716 # The following option is disabled to improve binary
3717 # binary size in gcc 4.8. 3717 # size and performance in gcc 4.9.
3718 # TODO(fdegans) Reevaluate when we upgrade GCC. 3718 # TODO(fdegans) Reevaluate when we upgrade GCC.
pasko 2014/07/28 13:14:30 nit: I think there is no need to have a TODO for
Fabrice (no longer in Chrome) 2014/07/28 13:40:43 Done.
3719 '-fno-partial-inlining',
3720 '-fno-early-inlining',
3721 '-fno-tree-copy-prop',
3722 '-fno-tree-loop-optimize',
3723 '-fno-move-loop-invariants',
3724 '-fno-caller-saves', 3719 '-fno-caller-saves',
3725 '-Wno-psabi', 3720 '-Wno-psabi',
3726 ], 3721 ],
3727 # Android now supports .relro sections properly. 3722 # Android now supports .relro sections properly.
3728 # NOTE: While these flags enable the generation of .relro 3723 # NOTE: While these flags enable the generation of .relro
3729 # sections, the generated libraries can still be loaded on 3724 # sections, the generated libraries can still be loaded on
3730 # older Android platform versions. 3725 # older Android platform versions.
3731 'ldflags': [ 3726 'ldflags': [
3732 '-Wl,-z,relro', 3727 '-Wl,-z,relro',
3733 '-Wl,-z,now', 3728 '-Wl,-z,now',
(...skipping 16 matching lines...) Expand all
3750 'cflags!': [ 3745 'cflags!': [
3751 '-fomit-frame-pointer', 3746 '-fomit-frame-pointer',
3752 ], 3747 ],
3753 }], 3748 }],
3754 ['clang==1', { 3749 ['clang==1', {
3755 'cflags!': [ 3750 'cflags!': [
3756 # Clang does not support the following options. 3751 # Clang does not support the following options.
3757 '-mthumb-interwork', 3752 '-mthumb-interwork',
3758 '-finline-limit=64', 3753 '-finline-limit=64',
3759 '-fno-tree-sra', 3754 '-fno-tree-sra',
3760 '-fno-partial-inlining',
3761 '-fno-early-inlining',
3762 '-fno-tree-copy-prop',
3763 '-fno-tree-loop-optimize',
3764 '-fno-move-loop-invariants',
3765 '-fno-caller-saves', 3755 '-fno-caller-saves',
3766 '-Wno-psabi', 3756 '-Wno-psabi',
3767 ], 3757 ],
3768 'cflags': [ 3758 'cflags': [
3769 # TODO(hans) Enable integrated-as (crbug.com/124610). 3759 # TODO(hans) Enable integrated-as (crbug.com/124610).
3770 '-no-integrated-as', 3760 '-no-integrated-as',
3771 '-B<(android_toolchain)', # Else /usr/bin/as gets pic ked up. 3761 '-B<(android_toolchain)', # Else /usr/bin/as gets pic ked up.
3772 ], 3762 ],
3773 3763
3774 'ldflags!': [ 3764 'ldflags!': [
(...skipping 1745 matching lines...) Expand 10 before | Expand all | Expand 10 after
5520 }, 5510 },
5521 }], 5511 }],
5522 ['enable_new_npdevice_api==1', { 5512 ['enable_new_npdevice_api==1', {
5523 'target_defaults': { 5513 'target_defaults': {
5524 'defines': [ 5514 'defines': [
5525 'ENABLE_NEW_NPDEVICE_API', 5515 'ENABLE_NEW_NPDEVICE_API',
5526 ], 5516 ],
5527 }, 5517 },
5528 }], 5518 }],
5529 # Don't warn about the "typedef 'foo' locally defined but not used" 5519 # Don't warn about the "typedef 'foo' locally defined but not used"
5530 # for gcc 4.8. 5520 # for gcc 4.8 and higher.
5531 # TODO: remove this flag once all builds work. See crbug.com/227506 5521 # TODO: remove this flag once all builds work. See crbug.com/227506
5532 ['gcc_version>=48 and clang==0', { 5522 ['gcc_version>=48 and clang==0', {
5533 'target_defaults': { 5523 'target_defaults': {
5534 'cflags': [ 5524 'cflags': [
5535 '-Wno-unused-local-typedefs', 5525 '-Wno-unused-local-typedefs',
5536 ], 5526 ],
5537 }, 5527 },
5538 }], 5528 }],
5539 # We need a special case to handle the android webview build on mac because 5529 # We need a special case to handle the android webview build on mac because
5540 # the host gcc there doesn't accept this flag, but the target gcc may 5530 # the host gcc there doesn't accept this flag, but the target gcc may
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
5658 # settings in target dicts. SYMROOT is a special case, because many other 5648 # settings in target dicts. SYMROOT is a special case, because many other
5659 # Xcode variables depend on it, including variables such as 5649 # Xcode variables depend on it, including variables such as
5660 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 5650 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
5661 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 5651 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
5662 # files to appear (when present) in the UI as actual files and not red 5652 # files to appear (when present) in the UI as actual files and not red
5663 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 5653 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
5664 # and therefore SYMROOT, needs to be set at the project level. 5654 # and therefore SYMROOT, needs to be set at the project level.
5665 'SYMROOT': '<(DEPTH)/xcodebuild', 5655 'SYMROOT': '<(DEPTH)/xcodebuild',
5666 }, 5656 },
5667 } 5657 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698