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