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 1440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1451 }], | 1451 }], |
1452 # The version of GCC in use, set later in platforms that use GCC and have | 1452 # The version of GCC in use, set later in platforms that use GCC and have |
1453 # not explicitly chosen to build with clang. Currently, this means all | 1453 # not explicitly chosen to build with clang. Currently, this means all |
1454 # platforms except Windows, Mac and iOS. | 1454 # platforms except Windows, Mac and iOS. |
1455 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so that | 1455 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so that |
1456 # it takes effect here. | 1456 # it takes effect here. |
1457 ['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', { | 1457 ['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', { |
1458 'conditions': [ | 1458 'conditions': [ |
1459 ['OS=="android"', { | 1459 ['OS=="android"', { |
1460 # We directly set the gcc versions since we know what we use. | 1460 # We directly set the gcc versions since we know what we use. |
1461 'gcc_version%': 48, | 1461 'conditions': [ |
| 1462 ['target_arch=="x64" or target_arch=="arm64"', { |
| 1463 'gcc_version%': 48, |
| 1464 }, { |
| 1465 'gcc_version%': 46, |
| 1466 }], |
| 1467 ], |
1462 }, { | 1468 }, { |
1463 'gcc_version%': '<!pymod_do_main(compiler_version target compiler)', | 1469 'gcc_version%': '<!pymod_do_main(compiler_version target compiler)', |
1464 }], | 1470 }], |
1465 ['android_webview_build==1', { | 1471 ['android_webview_build==1', { |
1466 # Android WebView uses a hermetic toolchain even for host, so set it | 1472 # Android WebView uses a hermetic toolchain even for host, so set it |
1467 # manually here. | 1473 # manually here. |
1468 'conditions': [ | 1474 'conditions': [ |
1469 ['host_os=="mac"', { | 1475 ['host_os=="mac"', { |
1470 'host_gcc_version%': 42, | 1476 'host_gcc_version%': 42, |
1471 }, { # linux | 1477 }, { # linux |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1598 | 1604 |
1599 # Android API level 14 is ICS (Android 4.0) which is the minimum | 1605 # Android API level 14 is ICS (Android 4.0) which is the minimum |
1600 # platform requirement for Chrome on Android, we use it for native | 1606 # platform requirement for Chrome on Android, we use it for native |
1601 # code compilation. | 1607 # code compilation. |
1602 'conditions': [ | 1608 'conditions': [ |
1603 ['target_arch == "ia32"', { | 1609 ['target_arch == "ia32"', { |
1604 'android_app_abi%': 'x86', | 1610 'android_app_abi%': 'x86', |
1605 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gd
bserver/gdbserver', | 1611 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gd
bserver/gdbserver', |
1606 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/
arch-x86', | 1612 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/
arch-x86', |
1607 'android_ndk_lib_dir%': 'usr/lib', | 1613 'android_ndk_lib_dir%': 'usr/lib', |
1608 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.8/preb
uilt/<(host_os)-<(android_host_arch)/bin', | 1614 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.6/preb
uilt/<(host_os)-<(android_host_arch)/bin', |
1609 }], | 1615 }], |
1610 ['target_arch == "x64"', { | 1616 ['target_arch == "x64"', { |
1611 'android_app_abi%': 'x86_64', | 1617 'android_app_abi%': 'x86_64', |
1612 'android_gdbserver%': '<(android_ndk_experimental_root)/prebuilt/a
ndroid-x86_64/gdbserver/gdbserver', | 1618 'android_gdbserver%': '<(android_ndk_experimental_root)/prebuilt/a
ndroid-x86_64/gdbserver/gdbserver', |
1613 'android_ndk_sysroot%': '<(android_ndk_experimental_root)/platform
s/android-20/arch-x86_64', | 1619 'android_ndk_sysroot%': '<(android_ndk_experimental_root)/platform
s/android-20/arch-x86_64', |
1614 'android_ndk_lib_dir%': 'usr/lib64', | 1620 'android_ndk_lib_dir%': 'usr/lib64', |
1615 'android_toolchain%': '<(android_ndk_experimental_root)/toolchains
/x86_64-4.8/prebuilt/<(host_os)-<(android_host_arch)/bin', | 1621 'android_toolchain%': '<(android_ndk_experimental_root)/toolchains
/x86_64-4.8/prebuilt/<(host_os)-<(android_host_arch)/bin', |
1616 'android_stlport_root': '<(android_ndk_experimental_root)/sources/
cxx-stl/stlport', | 1622 'android_stlport_root': '<(android_ndk_experimental_root)/sources/
cxx-stl/stlport', |
1617 }], | 1623 }], |
1618 ['target_arch=="arm"', { | 1624 ['target_arch=="arm"', { |
1619 'conditions': [ | 1625 'conditions': [ |
1620 ['arm_version<7', { | 1626 ['arm_version<7', { |
1621 'android_app_abi%': 'armeabi', | 1627 'android_app_abi%': 'armeabi', |
1622 }, { | 1628 }, { |
1623 'android_app_abi%': 'armeabi-v7a', | 1629 'android_app_abi%': 'armeabi-v7a', |
1624 }], | 1630 }], |
1625 ], | 1631 ], |
1626 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gd
bserver/gdbserver', | 1632 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gd
bserver/gdbserver', |
1627 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/
arch-arm', | 1633 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/
arch-arm', |
1628 'android_ndk_lib_dir%': 'usr/lib', | 1634 'android_ndk_lib_dir%': 'usr/lib', |
1629 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-an
droideabi-4.8/prebuilt/<(host_os)-<(android_host_arch)/bin', | 1635 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-an
droideabi-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin', |
1630 }], | 1636 }], |
1631 ['target_arch == "arm64"', { | 1637 ['target_arch == "arm64"', { |
1632 'android_app_abi%': 'arm64-v8a', | 1638 'android_app_abi%': 'arm64-v8a', |
1633 'android_gdbserver%': '<(android_ndk_experimental_root)/prebuilt/a
ndroid-arm64/gdbserver/gdbserver', | 1639 'android_gdbserver%': '<(android_ndk_experimental_root)/prebuilt/a
ndroid-arm64/gdbserver/gdbserver', |
1634 'android_ndk_sysroot%': '<(android_ndk_experimental_root)/platform
s/android-20/arch-arm64', | 1640 'android_ndk_sysroot%': '<(android_ndk_experimental_root)/platform
s/android-20/arch-arm64', |
1635 'android_ndk_lib_dir%': 'usr/lib', | 1641 'android_ndk_lib_dir%': 'usr/lib', |
1636 'android_toolchain%': '<(android_ndk_experimental_root)/toolchains
/aarch64-linux-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin', | 1642 'android_toolchain%': '<(android_ndk_experimental_root)/toolchains
/aarch64-linux-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin', |
1637 'android_stlport_root': '<(android_ndk_experimental_root)/sources/
cxx-stl/stlport', | 1643 'android_stlport_root': '<(android_ndk_experimental_root)/sources/
cxx-stl/stlport', |
1638 }], | 1644 }], |
1639 ['target_arch == "mipsel"', { | 1645 ['target_arch == "mipsel"', { |
1640 'android_app_abi%': 'mips', | 1646 'android_app_abi%': 'mips', |
1641 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips/g
dbserver/gdbserver', | 1647 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips/g
dbserver/gdbserver', |
1642 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/
arch-mips', | 1648 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/
arch-mips', |
1643 'android_ndk_lib_dir%': 'usr/lib', | 1649 'android_ndk_lib_dir%': 'usr/lib', |
1644 'android_toolchain%': '<(android_ndk_root)/toolchains/mipsel-linux
-android-4.8/prebuilt/<(host_os)-<(android_host_arch)/bin', | 1650 'android_toolchain%': '<(android_ndk_root)/toolchains/mipsel-linux
-android-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin', |
1645 }], | 1651 }], |
1646 ], | 1652 ], |
1647 }, | 1653 }, |
1648 # Copy conditionally-set variables out one scope. | 1654 # Copy conditionally-set variables out one scope. |
1649 'android_app_abi%': '<(android_app_abi)', | 1655 'android_app_abi%': '<(android_app_abi)', |
1650 'android_gdbserver%': '<(android_gdbserver)', | 1656 'android_gdbserver%': '<(android_gdbserver)', |
1651 'android_ndk_root%': '<(android_ndk_root)', | 1657 'android_ndk_root%': '<(android_ndk_root)', |
1652 'android_ndk_sysroot%': '<(android_ndk_sysroot)', | 1658 'android_ndk_sysroot%': '<(android_ndk_sysroot)', |
1653 'android_sdk_root%': '<(android_sdk_root)', | 1659 'android_sdk_root%': '<(android_sdk_root)', |
1654 'android_sdk_version%': '<(android_sdk_version)', | 1660 'android_sdk_version%': '<(android_sdk_version)', |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2117 # Set default compiler flags depending on ARM version. | 2123 # Set default compiler flags depending on ARM version. |
2118 ['arm_version==6 and android_webview_build==0', { | 2124 ['arm_version==6 and android_webview_build==0', { |
2119 'arm_arch%': 'armv6', | 2125 'arm_arch%': 'armv6', |
2120 'arm_tune%': '', | 2126 'arm_tune%': '', |
2121 'arm_fpu%': 'vfp', | 2127 'arm_fpu%': 'vfp', |
2122 'arm_float_abi%': 'softfp', | 2128 'arm_float_abi%': 'softfp', |
2123 'arm_thumb%': 0, | 2129 'arm_thumb%': 0, |
2124 }], | 2130 }], |
2125 ['arm_version==7 and android_webview_build==0', { | 2131 ['arm_version==7 and android_webview_build==0', { |
2126 'arm_arch%': 'armv7-a', | 2132 'arm_arch%': 'armv7-a', |
2127 'arm_tune%': 'generic-armv7-a', | 2133 'arm_tune%': '', |
2128 'conditions': [ | 2134 'conditions': [ |
2129 ['arm_neon==1', { | 2135 ['arm_neon==1', { |
2130 'arm_fpu%': 'neon', | 2136 'arm_fpu%': 'neon', |
2131 }, { | 2137 }, { |
2132 'arm_fpu%': 'vfpv3-d16', | 2138 'arm_fpu%': 'vfpv3-d16', |
2133 }], | 2139 }], |
2134 ], | 2140 ], |
2135 # Change the default to hard once the armhf transition is complete. | 2141 # Change the default to hard once the armhf transition is complete. |
2136 'arm_float_abi%': 'softfp', | 2142 'arm_float_abi%': 'softfp', |
2137 'arm_thumb%': 1, | 2143 'arm_thumb%': 1, |
(...skipping 1405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3543 }], | 3549 }], |
3544 ['arm_thumb==1', { | 3550 ['arm_thumb==1', { |
3545 'cflags': [ | 3551 'cflags': [ |
3546 '-mthumb', | 3552 '-mthumb', |
3547 ] | 3553 ] |
3548 }], | 3554 }], |
3549 ['OS=="android"', { | 3555 ['OS=="android"', { |
3550 # Most of the following flags are derived from what Android | 3556 # Most of the following flags are derived from what Android |
3551 # uses by default when building for arm, reference for which | 3557 # uses by default when building for arm, reference for which |
3552 # can be found in the following file in the Android NDK: | 3558 # can be found in the following file in the Android NDK: |
3553 # toolchains/arm-linux-androideabi-4.8/setup.mk | 3559 # toolchains/arm-linux-androideabi-4.4.3/setup.mk |
3554 'cflags': [ | 3560 'cflags': [ |
3555 # The tree-sra optimization (scalar replacement for | 3561 # The tree-sra optimization (scalar replacement for |
3556 # aggregates enabling subsequent optimizations) leads to | 3562 # aggregates enabling subsequent optimizations) leads to |
3557 # invalid code generation when using the Android NDK's | 3563 # invalid code generation when using the Android NDK's |
3558 # compiler (r5-r7). This can be verified using | 3564 # compiler (r5-r7). This can be verified using |
3559 # webkit_unit_tests' WTF.Checked_int8_t test. | 3565 # webkit_unit_tests' WTF.Checked_int8_t test. |
3560 '-fno-tree-sra', | 3566 '-fno-tree-sra', |
3561 # The following 6 options are disabled to save on | |
3562 # binary size in gcc 4.8. | |
3563 # TODO(fdegans) Reevaluate when we upgrade GCC. | |
3564 '-fno-partial-inlining', | |
3565 '-fno-early-inlining', | |
3566 '-fno-tree-copy-prop', | |
3567 '-fno-tree-loop-optimize', | |
3568 '-fno-move-loop-invariants', | |
3569 '-fno-caller-saves', | |
3570 '-Wno-psabi', | 3567 '-Wno-psabi', |
3571 ], | 3568 ], |
3572 # Android now supports .relro sections properly. | 3569 # Android now supports .relro sections properly. |
3573 # NOTE: While these flags enable the generation of .relro | 3570 # NOTE: While these flags enable the generation of .relro |
3574 # sections, the generated libraries can still be loaded on | 3571 # sections, the generated libraries can still be loaded on |
3575 # older Android platform versions. | 3572 # older Android platform versions. |
3576 'ldflags': [ | 3573 'ldflags': [ |
3577 '-Wl,-z,relro', | 3574 '-Wl,-z,relro', |
3578 '-Wl,-z,now', | 3575 '-Wl,-z,now', |
3579 '-fuse-ld=gold', | 3576 '-fuse-ld=gold', |
(...skipping 15 matching lines...) Expand all Loading... |
3595 'cflags!': [ | 3592 'cflags!': [ |
3596 '-fomit-frame-pointer', | 3593 '-fomit-frame-pointer', |
3597 ], | 3594 ], |
3598 }], | 3595 }], |
3599 ['clang==1', { | 3596 ['clang==1', { |
3600 'cflags!': [ | 3597 'cflags!': [ |
3601 # Clang does not support the following options. | 3598 # Clang does not support the following options. |
3602 '-mthumb-interwork', | 3599 '-mthumb-interwork', |
3603 '-finline-limit=64', | 3600 '-finline-limit=64', |
3604 '-fno-tree-sra', | 3601 '-fno-tree-sra', |
3605 '-fno-partial-inlining', | |
3606 '-fno-early-inlining', | |
3607 '-fno-tree-copy-prop', | |
3608 '-fno-tree-loop-optimize', | |
3609 '-fno-move-loop-invariants', | |
3610 '-fno-caller-saves', | |
3611 '-Wno-psabi', | 3602 '-Wno-psabi', |
3612 ], | 3603 ], |
3613 'cflags': [ | 3604 'cflags': [ |
3614 # TODO(hans) Enable integrated-as (crbug.com/124610). | 3605 # TODO(hans) Enable integrated-as (crbug.com/124610). |
3615 '-no-integrated-as', | 3606 '-no-integrated-as', |
3616 '-B<(android_toolchain)', # Else /usr/bin/as gets pic
ked up. | 3607 '-B<(android_toolchain)', # Else /usr/bin/as gets pic
ked up. |
3617 ], | 3608 ], |
3618 | 3609 |
3619 'ldflags!': [ | 3610 'ldflags!': [ |
3620 # Clang does not support the following options. | 3611 # Clang does not support the following options. |
(...skipping 1758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5379 # settings in target dicts. SYMROOT is a special case, because many other | 5370 # settings in target dicts. SYMROOT is a special case, because many other |
5380 # Xcode variables depend on it, including variables such as | 5371 # Xcode variables depend on it, including variables such as |
5381 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | 5372 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
5382 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the | 5373 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
5383 # files to appear (when present) in the UI as actual files and not red | 5374 # files to appear (when present) in the UI as actual files and not red |
5384 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, | 5375 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
5385 # and therefore SYMROOT, needs to be set at the project level. | 5376 # and therefore SYMROOT, needs to be set at the project level. |
5386 'SYMROOT': '<(DEPTH)/xcodebuild', | 5377 'SYMROOT': '<(DEPTH)/xcodebuild', |
5387 }, | 5378 }, |
5388 } | 5379 } |
OLD | NEW |