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 1659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1670 'android_host_arch%': '<!(uname -m)', | 1670 'android_host_arch%': '<!(uname -m)', |
1671 # Android API-level of the SDK used for compilation. | 1671 # Android API-level of the SDK used for compilation. |
1672 'android_sdk_version%': '21', | 1672 'android_sdk_version%': '21', |
1673 'android_sdk_build_tools_version%': '21.0.1', | 1673 'android_sdk_build_tools_version%': '21.0.1', |
1674 'host_os%': "<!(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')", | 1674 'host_os%': "<!(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')", |
1675 }, | 1675 }, |
1676 # Copy conditionally-set variables out one scope. | 1676 # Copy conditionally-set variables out one scope. |
1677 'android_ndk_root%': '<(android_ndk_root)', | 1677 'android_ndk_root%': '<(android_ndk_root)', |
1678 'android_sdk_root%': '<(android_sdk_root)', | 1678 'android_sdk_root%': '<(android_sdk_root)', |
1679 'android_sdk_version%': '<(android_sdk_version)', | 1679 'android_sdk_version%': '<(android_sdk_version)', |
1680 'android_stlport_root': '<(android_ndk_root)/sources/cxx-stl/stlport', | 1680 'android_libcpp_root': '<(android_ndk_root)/sources/cxx-stl/llvm-libc+ +', |
1681 'host_os%': '<(host_os)', | 1681 'host_os%': '<(host_os)', |
1682 | 1682 |
1683 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_v ersion)', | 1683 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_v ersion)', |
1684 # Android SDK build tools (e.g. dx, aapt, aidl) | 1684 # Android SDK build tools (e.g. dx, aapt, aidl) |
1685 'android_sdk_tools%': '<(android_sdk_root)/build-tools/<(android_sdk_b uild_tools_version)', | 1685 'android_sdk_tools%': '<(android_sdk_root)/build-tools/<(android_sdk_b uild_tools_version)', |
1686 | 1686 |
1687 # Android API level 14 is ICS (Android 4.0) which is the minimum | 1687 # Android API level 14 is ICS (Android 4.0) which is the minimum |
1688 # platform requirement for Chrome on Android, we use it for native | 1688 # platform requirement for Chrome on Android, we use it for native |
1689 # code compilation. | 1689 # code compilation. |
1690 'conditions': [ | 1690 'conditions': [ |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1747 'android_sdk_root%': '<(android_sdk_root)', | 1747 'android_sdk_root%': '<(android_sdk_root)', |
1748 'android_sdk_version%': '<(android_sdk_version)', | 1748 'android_sdk_version%': '<(android_sdk_version)', |
1749 'android_toolchain%': '<(android_toolchain)', | 1749 'android_toolchain%': '<(android_toolchain)', |
1750 | 1750 |
1751 'android_ndk_include': '<(android_ndk_sysroot)/usr/include', | 1751 'android_ndk_include': '<(android_ndk_sysroot)/usr/include', |
1752 'android_ndk_lib': '<(android_ndk_sysroot)/<(android_ndk_lib_dir)', | 1752 'android_ndk_lib': '<(android_ndk_sysroot)/<(android_ndk_lib_dir)', |
1753 'android_sdk_tools%': '<(android_sdk_tools)', | 1753 'android_sdk_tools%': '<(android_sdk_tools)', |
1754 'android_sdk%': '<(android_sdk)', | 1754 'android_sdk%': '<(android_sdk)', |
1755 'android_sdk_jar%': '<(android_sdk)/android.jar', | 1755 'android_sdk_jar%': '<(android_sdk)/android.jar', |
1756 | 1756 |
1757 'android_stlport_root': '<(android_stlport_root)', | 1757 'android_libcpp_root': '<(android_libcpp_root)', |
1758 'android_stlport_include': '<(android_stlport_root)/stlport', | 1758 'android_libcpp_include': '<(android_libcpp_root)/libcxx/include', |
1759 'android_stlport_libs_dir': '<(android_stlport_root)/libs/<(android_app_ abi)', | 1759 'android_libcpp_libs_dir': '<(android_libcpp_root)/libs/<(android_app_ab i)', |
1760 | |
1760 'host_os%': '<(host_os)', | 1761 'host_os%': '<(host_os)', |
1761 | 1762 |
1762 # Location of the "objcopy" binary, used by both gyp and scripts. | 1763 # Location of the "objcopy" binary, used by both gyp and scripts. |
1763 'android_objcopy%' : '<!(/bin/echo -n <(android_toolchain)/*-objcopy)', | 1764 'android_objcopy%' : '<!(/bin/echo -n <(android_toolchain)/*-objcopy)', |
1764 | 1765 |
1765 # Location of the "strip" binary, used by both gyp and scripts. | 1766 # Location of the "strip" binary, used by both gyp and scripts. |
1766 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)', | 1767 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)', |
1767 | 1768 |
1768 # Location of the "readelf" binary. | 1769 # Location of the "readelf" binary. |
1769 'android_readelf%' : '<!(/bin/echo -n <(android_toolchain)/*-readelf)', | 1770 'android_readelf%' : '<!(/bin/echo -n <(android_toolchain)/*-readelf)', |
(...skipping 2137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3907 '-fno-tree-sra', | 3908 '-fno-tree-sra', |
3908 # The following option is disabled to improve binary | 3909 # The following option is disabled to improve binary |
3909 # size and performance in gcc 4.9. | 3910 # size and performance in gcc 4.9. |
3910 '-fno-caller-saves', | 3911 '-fno-caller-saves', |
3911 '-Wno-psabi', | 3912 '-Wno-psabi', |
3912 ], | 3913 ], |
3913 # Android now supports .relro sections properly. | 3914 # Android now supports .relro sections properly. |
3914 # NOTE: While these flags enable the generation of .relro | 3915 # NOTE: While these flags enable the generation of .relro |
3915 # sections, the generated libraries can still be loaded on | 3916 # sections, the generated libraries can still be loaded on |
3916 # older Android platform versions. | 3917 # older Android platform versions. |
3918 'cflags_cc': [ | |
3919 '-std=gnu++11', | |
3920 ], | |
Nico
2014/11/05 17:30:10
Why do you need this? Everything should already bu
Fabrice (no longer in Chrome)
2014/11/12 11:52:29
Done.
| |
3917 'ldflags': [ | 3921 'ldflags': [ |
3918 '-Wl,-z,relro', | 3922 '-Wl,-z,relro', |
3919 '-Wl,-z,now', | 3923 '-Wl,-z,now', |
3920 '-fuse-ld=gold', | 3924 '-fuse-ld=gold', |
3921 ], | 3925 ], |
3922 'conditions': [ | 3926 'conditions': [ |
3923 ['gcc_version==48 and clang==0', { | 3927 ['gcc_version==48 and clang==0', { |
3924 'cflags': [ | 3928 'cflags': [ |
3925 # The following 5 options are disabled to save on | 3929 # The following 5 options are disabled to save on |
3926 # binary size in GCC 4.8. | 3930 # binary size in GCC 4.8. |
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4464 ['OS=="android"', { | 4468 ['OS=="android"', { |
4465 'variables': { | 4469 'variables': { |
4466 # This is a unique identifier for a given build. It's used for | 4470 # This is a unique identifier for a given build. It's used for |
4467 # identifying various build artifacts corresponding to a particular | 4471 # identifying various build artifacts corresponding to a particular |
4468 # build of chrome (e.g. where to find archived symbols). | 4472 # build of chrome (e.g. where to find archived symbols). |
4469 'chrome_build_id%': '', | 4473 'chrome_build_id%': '', |
4470 'conditions': [ | 4474 'conditions': [ |
4471 # Figure this out early since it needs symbols from libgcc.a, so it | 4475 # Figure this out early since it needs symbols from libgcc.a, so it |
4472 # has to be before that in the set of libraries. | 4476 # has to be before that in the set of libraries. |
4473 ['component=="shared_library"', { | 4477 ['component=="shared_library"', { |
4474 'android_stlport_library': 'stlport_shared', | 4478 'android_libcpp_library': 'c++_shared', |
4475 }, { | 4479 }, { |
4476 'android_stlport_library': 'stlport_static', | 4480 'android_libcpp_library': 'c++_static', |
4477 }], | 4481 }], |
4478 ], | 4482 ], |
4479 | 4483 |
4480 # Placing this variable here prevents from forking libvpx, used | 4484 # Placing this variable here prevents from forking libvpx, used |
4481 # by remoting. Remoting is off, so it needn't built, | 4485 # by remoting. Remoting is off, so it needn't built, |
4482 # so forking it's deps seems like overkill. | 4486 # so forking it's deps seems like overkill. |
4483 # But this variable need defined to properly run gyp. | 4487 # But this variable need defined to properly run gyp. |
4484 # A proper solution is to have an OS==android conditional | 4488 # A proper solution is to have an OS==android conditional |
4485 # in third_party/libvpx/libvpx.gyp to define it. | 4489 # in third_party/libvpx/libvpx.gyp to define it. |
4486 'libvpx_path': 'lib/linux/arm', | 4490 'libvpx_path': 'lib/linux/arm', |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4550 '-g', | 4554 '-g', |
4551 '-fstack-protector', | 4555 '-fstack-protector', |
4552 '-fno-short-enums', | 4556 '-fno-short-enums', |
4553 '-finline-limit=64', | 4557 '-finline-limit=64', |
4554 '-Wa,--noexecstack', | 4558 '-Wa,--noexecstack', |
4555 '<@(release_extra_cflags)', | 4559 '<@(release_extra_cflags)', |
4556 ], | 4560 ], |
4557 'defines': [ | 4561 'defines': [ |
4558 'ANDROID', | 4562 'ANDROID', |
4559 '__GNU_SOURCE=1', # Necessary for clone() | 4563 '__GNU_SOURCE=1', # Necessary for clone() |
4560 'USE_STLPORT=1', | |
4561 '_STLP_USE_PTR_SPECIALIZATIONS=1', | |
4562 'CHROME_BUILD_ID="<(chrome_build_id)"', | 4564 'CHROME_BUILD_ID="<(chrome_build_id)"', |
4563 ], | 4565 ], |
4564 'ldflags!': [ | 4566 'ldflags!': [ |
4565 '-pthread', # Not supported by Android toolchain. | 4567 '-pthread', # Not supported by Android toolchain. |
4566 ], | 4568 ], |
4567 'ldflags': [ | 4569 'ldflags': [ |
4568 '-Wl,--no-undefined', | 4570 '-Wl,--no-undefined', |
4569 ], | 4571 ], |
4570 'conditions': [ | 4572 'conditions': [ |
4571 ['component=="static_library"', { | 4573 ['component=="static_library"', { |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4635 'HAVE_SYS_UIO_H', | 4637 'HAVE_SYS_UIO_H', |
4636 ], | 4638 ], |
4637 'cflags': [ | 4639 'cflags': [ |
4638 '--sysroot=<(android_ndk_sysroot)', | 4640 '--sysroot=<(android_ndk_sysroot)', |
4639 ], | 4641 ], |
4640 'ldflags': [ | 4642 'ldflags': [ |
4641 '--sysroot=<(android_ndk_sysroot)', | 4643 '--sysroot=<(android_ndk_sysroot)', |
4642 '-nostdlib', | 4644 '-nostdlib', |
4643 ], | 4645 ], |
4644 'libraries': [ | 4646 'libraries': [ |
4645 '-l<(android_stlport_library)', | 4647 '-l<(android_libcpp_library)', |
4648 '-latomic', | |
4646 # Manually link the libgcc.a that the cross compiler uses. | 4649 # Manually link the libgcc.a that the cross compiler uses. |
4647 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)', | 4650 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)', |
4651 '-lm', | |
4648 '-lc', | 4652 '-lc', |
4649 '-ldl', | 4653 '-ldl', |
4650 '-lm', | |
4651 ], | 4654 ], |
4652 }], | 4655 }], |
4653 ['android_webview_build==1', { | 4656 ['android_webview_build==1', { |
4654 'cflags': [ | 4657 'cflags': [ |
4655 # Android predefines this as 1; undefine it here so Chromium | 4658 # Android predefines this as 1; undefine it here so Chromium |
4656 # can redefine it later to be 2 for chromium code and unset | 4659 # can redefine it later to be 2 for chromium code and unset |
4657 # for third party code. This works because cflags are added | 4660 # for third party code. This works because cflags are added |
4658 # before defines. | 4661 # before defines. |
4659 '-U_FORTIFY_SOURCE', | 4662 '-U_FORTIFY_SOURCE', |
4660 # Disable any additional warnings enabled by the Android build system but which | 4663 # Disable any additional warnings enabled by the Android build system but which |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4692 ], | 4695 ], |
4693 }], | 4696 }], |
4694 ], | 4697 ], |
4695 }], | 4698 }], |
4696 ['target_arch == "arm"', { | 4699 ['target_arch == "arm"', { |
4697 'ldflags': [ | 4700 'ldflags': [ |
4698 # Enable identical code folding to reduce size. | 4701 # Enable identical code folding to reduce size. |
4699 '-Wl,--icf=safe', | 4702 '-Wl,--icf=safe', |
4700 ], | 4703 ], |
4701 }], | 4704 }], |
4702 # NOTE: The stlport header include paths below are specified in | |
4703 # cflags rather than include_dirs because they need to come | |
4704 # after include_dirs. Think of them like system headers, but | |
4705 # don't use '-isystem' because the arm-linux-androideabi-4.4.3 | |
4706 # toolchain (circa Gingerbread) will exhibit strange errors. | |
4707 # The include ordering here is important; change with caution. | |
4708 ['android_webview_build==0', { | 4705 ['android_webview_build==0', { |
4709 'cflags': [ | 4706 'cflags': [ |
4710 '-isystem<(android_stlport_include)', | 4707 '-isystem<(android_libcpp_include)', |
4708 '-isystem<(android_ndk_root)/sources/cxx-stl/llvm-libc++abi/li bcxxabi/include', | |
4709 '-isystem<(android_ndk_root)/sources/android/support/include', | |
4711 ], | 4710 ], |
4712 'ldflags': [ | 4711 'ldflags': [ |
4713 '-L<(android_stlport_libs_dir)', | 4712 '-L<(android_libcpp_libs_dir)', |
4714 ], | 4713 ], |
4715 }, { # else: android_webview_build!=0 | 4714 }, { # else: android_webview_build!=0 |
4716 'aosp_build_settings': { | 4715 'aosp_build_settings': { |
4717 # Specify that we want to statically link stlport from the | 4716 # Specify that we want to statically link stlport from the |
4718 # NDK. This will provide all the include and library paths | 4717 # NDK. This will provide all the include and library paths |
4719 # automatically at build time, and link the right library. | 4718 # automatically at build time, and link the right library. |
4720 'LOCAL_NDK_STL_VARIANT': 'stlport_static', | 4719 'LOCAL_NDK_STL_VARIANT': 'libc++_static', |
4721 }, | 4720 }, |
4722 }], | 4721 }], |
4723 ['target_arch=="ia32"', { | 4722 ['target_arch=="ia32"', { |
4724 # The x86 toolchain currently has problems with stack-protector. | 4723 # The x86 toolchain currently has problems with stack-protector. |
4725 'cflags!': [ | 4724 'cflags!': [ |
4726 '-fstack-protector', | 4725 '-fstack-protector', |
4727 ], | 4726 ], |
4728 'cflags': [ | 4727 'cflags': [ |
4729 '-fno-stack-protector', | 4728 '-fno-stack-protector', |
4730 ], | 4729 ], |
(...skipping 1157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5888 # settings in target dicts. SYMROOT is a special case, because many other | 5887 # settings in target dicts. SYMROOT is a special case, because many other |
5889 # Xcode variables depend on it, including variables such as | 5888 # Xcode variables depend on it, including variables such as |
5890 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | 5889 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
5891 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the | 5890 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
5892 # files to appear (when present) in the UI as actual files and not red | 5891 # files to appear (when present) in the UI as actual files and not red |
5893 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, | 5892 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
5894 # and therefore SYMROOT, needs to be set at the project level. | 5893 # and therefore SYMROOT, needs to be set at the project level. |
5895 'SYMROOT': '<(DEPTH)/xcodebuild', | 5894 'SYMROOT': '<(DEPTH)/xcodebuild', |
5896 }, | 5895 }, |
5897 } | 5896 } |
OLD | NEW |