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 1670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1681 # Android API-level of the SDK used for compilation. | 1681 # Android API-level of the SDK used for compilation. |
1682 'android_sdk_version%': '22', | 1682 'android_sdk_version%': '22', |
1683 'android_sdk_build_tools_version%': '22.0.0', | 1683 'android_sdk_build_tools_version%': '22.0.0', |
1684 'host_os%': "<!(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')", | 1684 'host_os%': "<!(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')", |
1685 }, | 1685 }, |
1686 # Copy conditionally-set variables out one scope. | 1686 # Copy conditionally-set variables out one scope. |
1687 'android_ndk_root%': '<(android_ndk_root)', | 1687 'android_ndk_root%': '<(android_ndk_root)', |
1688 'android_ndk_absolute_root%': '<(android_ndk_absolute_root)', | 1688 'android_ndk_absolute_root%': '<(android_ndk_absolute_root)', |
1689 'android_sdk_root%': '<(android_sdk_root)', | 1689 'android_sdk_root%': '<(android_sdk_root)', |
1690 'android_sdk_version%': '<(android_sdk_version)', | 1690 'android_sdk_version%': '<(android_sdk_version)', |
1691 'android_stlport_root': '<(android_ndk_root)/sources/cxx-stl/stlport', | 1691 'android_libcpp_root': '<(android_ndk_root)/sources/cxx-stl/llvm-libc+
+', |
1692 'host_os%': '<(host_os)', | 1692 'host_os%': '<(host_os)', |
1693 | 1693 |
1694 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_v
ersion)', | 1694 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_v
ersion)', |
1695 # Android SDK build tools (e.g. dx, aapt, aidl) | 1695 # Android SDK build tools (e.g. dx, aapt, aidl) |
1696 'android_sdk_tools%': '<(android_sdk_root)/build-tools/<(android_sdk_b
uild_tools_version)', | 1696 'android_sdk_tools%': '<(android_sdk_root)/build-tools/<(android_sdk_b
uild_tools_version)', |
1697 | 1697 |
1698 # Android API level 14 is ICS (Android 4.0) which is the minimum | 1698 # Android API level 14 is ICS (Android 4.0) which is the minimum |
1699 # platform requirement for Chrome on Android, we use it for native | 1699 # platform requirement for Chrome on Android, we use it for native |
1700 # code compilation. | 1700 # code compilation. |
1701 'conditions': [ | 1701 'conditions': [ |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1757 'android_sdk_root%': '<(android_sdk_root)', | 1757 'android_sdk_root%': '<(android_sdk_root)', |
1758 'android_sdk_version%': '<(android_sdk_version)', | 1758 'android_sdk_version%': '<(android_sdk_version)', |
1759 'android_toolchain%': '<(android_toolchain)', | 1759 'android_toolchain%': '<(android_toolchain)', |
1760 | 1760 |
1761 'android_ndk_include': '<(android_ndk_sysroot)/usr/include', | 1761 'android_ndk_include': '<(android_ndk_sysroot)/usr/include', |
1762 'android_ndk_lib': '<(android_ndk_sysroot)/<(android_ndk_lib_dir)', | 1762 'android_ndk_lib': '<(android_ndk_sysroot)/<(android_ndk_lib_dir)', |
1763 'android_sdk_tools%': '<(android_sdk_tools)', | 1763 'android_sdk_tools%': '<(android_sdk_tools)', |
1764 'android_sdk%': '<(android_sdk)', | 1764 'android_sdk%': '<(android_sdk)', |
1765 'android_sdk_jar%': '<(android_sdk)/android.jar', | 1765 'android_sdk_jar%': '<(android_sdk)/android.jar', |
1766 | 1766 |
1767 'android_stlport_root': '<(android_stlport_root)', | 1767 'android_libcpp_root': '<(android_libcpp_root)', |
1768 'android_stlport_include': '<(android_stlport_root)/stlport', | 1768 'android_libcpp_include': '<(android_libcpp_root)/libcxx/include', |
1769 'android_stlport_libs_dir': '<(android_stlport_root)/libs/<(android_app_
abi)', | 1769 'android_libcpp_libs_dir': '<(android_libcpp_root)/libs/<(android_app_ab
i)', |
1770 'host_os%': '<(host_os)', | 1770 'host_os%': '<(host_os)', |
1771 | 1771 |
1772 # Location of the "objcopy" binary, used by both gyp and scripts. | 1772 # Location of the "objcopy" binary, used by both gyp and scripts. |
1773 'android_objcopy%' : '<!(/bin/echo -n <(android_toolchain)/*-objcopy)', | 1773 'android_objcopy%' : '<!(/bin/echo -n <(android_toolchain)/*-objcopy)', |
1774 | 1774 |
1775 # Location of the "strip" binary, used by both gyp and scripts. | 1775 # Location of the "strip" binary, used by both gyp and scripts. |
1776 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)', | 1776 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)', |
1777 | 1777 |
1778 # Location of the "readelf" binary. | 1778 # Location of the "readelf" binary. |
1779 'android_readelf%' : '<!(/bin/echo -n <(android_toolchain)/*-readelf)', | 1779 'android_readelf%' : '<!(/bin/echo -n <(android_toolchain)/*-readelf)', |
(...skipping 2851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4631 ['OS=="android"', { | 4631 ['OS=="android"', { |
4632 'variables': { | 4632 'variables': { |
4633 # This is a unique identifier for a given build. It's used for | 4633 # This is a unique identifier for a given build. It's used for |
4634 # identifying various build artifacts corresponding to a particular | 4634 # identifying various build artifacts corresponding to a particular |
4635 # build of chrome (e.g. where to find archived symbols). | 4635 # build of chrome (e.g. where to find archived symbols). |
4636 'chrome_build_id%': '', | 4636 'chrome_build_id%': '', |
4637 'conditions': [ | 4637 'conditions': [ |
4638 # Figure this out early since it needs symbols from libgcc.a, so it | 4638 # Figure this out early since it needs symbols from libgcc.a, so it |
4639 # has to be before that in the set of libraries. | 4639 # has to be before that in the set of libraries. |
4640 ['component=="shared_library"', { | 4640 ['component=="shared_library"', { |
4641 'android_stlport_library': 'stlport_shared', | 4641 'android_libcpp_library': 'c++_shared', |
4642 }, { | 4642 }, { |
4643 'android_stlport_library': 'stlport_static', | 4643 'android_libcpp_library': 'c++_static', |
4644 }], | 4644 }], |
4645 ], | 4645 ], |
4646 | 4646 |
4647 # Placing this variable here prevents from forking libvpx, used | 4647 # Placing this variable here prevents from forking libvpx, used |
4648 # by remoting. Remoting is off, so it needn't built, | 4648 # by remoting. Remoting is off, so it needn't built, |
4649 # so forking it's deps seems like overkill. | 4649 # so forking it's deps seems like overkill. |
4650 # But this variable need defined to properly run gyp. | 4650 # But this variable need defined to properly run gyp. |
4651 # A proper solution is to have an OS==android conditional | 4651 # A proper solution is to have an OS==android conditional |
4652 # in third_party/libvpx/libvpx.gyp to define it. | 4652 # in third_party/libvpx/libvpx.gyp to define it. |
4653 'libvpx_path': 'lib/linux/arm', | 4653 'libvpx_path': 'lib/linux/arm', |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4713 ], | 4713 ], |
4714 'cflags': [ | 4714 'cflags': [ |
4715 '-ffunction-sections', | 4715 '-ffunction-sections', |
4716 '-funwind-tables', | 4716 '-funwind-tables', |
4717 '-g', | 4717 '-g', |
4718 '-fstack-protector', | 4718 '-fstack-protector', |
4719 '-fno-short-enums', | 4719 '-fno-short-enums', |
4720 '-finline-limit=64', | 4720 '-finline-limit=64', |
4721 '<@(release_extra_cflags)', | 4721 '<@(release_extra_cflags)', |
4722 '--sysroot=<(android_ndk_sysroot)', | 4722 '--sysroot=<(android_ndk_sysroot)', |
4723 # NOTE: The stlport header include paths below are specified in | 4723 # NOTE: The libc++ header include paths below are specified in |
4724 # cflags rather than include_dirs because they need to come | 4724 # cflags rather than include_dirs because they need to come |
4725 # after include_dirs. | 4725 # after include_dirs. |
4726 # The include ordering here is important; change with caution. | 4726 # The include ordering here is important; change with caution. |
4727 '-isystem<(android_stlport_include)', | 4727 '-isystem<(android_libcpp_include)', |
| 4728 '-isystem<(android_ndk_root)/sources/cxx-stl/llvm-libc++abi/libcxx
abi/include', |
| 4729 '-isystem<(android_ndk_root)/sources/android/support/include', |
4728 ], | 4730 ], |
4729 'defines': [ | 4731 'defines': [ |
4730 'ANDROID', | 4732 'ANDROID', |
4731 '__GNU_SOURCE=1', # Necessary for clone() | 4733 '__GNU_SOURCE=1', # Necessary for clone() |
4732 'USE_STLPORT=1', | |
4733 '_STLP_USE_PTR_SPECIALIZATIONS=1', | |
4734 'CHROME_BUILD_ID="<(chrome_build_id)"', | 4734 'CHROME_BUILD_ID="<(chrome_build_id)"', |
4735 # The NDK has these things, but doesn't define the constants | 4735 # The NDK has these things, but doesn't define the constants |
4736 # to say that it does. Define them here instead. | 4736 # to say that it does. Define them here instead. |
4737 'HAVE_SYS_UIO_H', | 4737 'HAVE_SYS_UIO_H', |
4738 ], | 4738 ], |
4739 'ldflags!': [ | 4739 'ldflags!': [ |
4740 '-pthread', # Not supported by Android toolchain. | 4740 '-pthread', # Not supported by Android toolchain. |
4741 ], | 4741 ], |
4742 'ldflags': [ | 4742 'ldflags': [ |
4743 '-Wl,--no-undefined', | 4743 '-Wl,--no-undefined', |
4744 '--sysroot=<(android_ndk_sysroot)', | 4744 '--sysroot=<(android_ndk_sysroot)', |
4745 '-nostdlib', | 4745 '-nostdlib', |
4746 '-L<(android_stlport_libs_dir)', | 4746 '-L<(android_libcpp_libs_dir)', |
4747 # Don't allow visible symbols from libgcc or stlport to be | 4747 # Don't allow visible symbols from libgcc or libc++ to be |
4748 # re-exported. | 4748 # re-exported. |
4749 '-Wl,--exclude-libs=libgcc.a', | 4749 '-Wl,--exclude-libs=libgcc.a', |
4750 '-Wl,--exclude-libs=libstlport_static.a', | 4750 '-Wl,--exclude-libs=libc++_static.a', |
4751 # Don't allow visible symbols from libraries that contain | 4751 # Don't allow visible symbols from libraries that contain |
4752 # assembly code with symbols that aren't hidden properly. | 4752 # assembly code with symbols that aren't hidden properly. |
4753 # http://crbug.com/448386 | 4753 # http://crbug.com/448386 |
4754 '-Wl,--exclude-libs=libcommon_audio.a', | 4754 '-Wl,--exclude-libs=libcommon_audio.a', |
4755 '-Wl,--exclude-libs=libcommon_audio_neon.a', | 4755 '-Wl,--exclude-libs=libcommon_audio_neon.a', |
4756 '-Wl,--exclude-libs=libcommon_audio_sse2.a', | 4756 '-Wl,--exclude-libs=libcommon_audio_sse2.a', |
4757 '-Wl,--exclude-libs=libiSACFix.a', | 4757 '-Wl,--exclude-libs=libiSACFix.a', |
4758 '-Wl,--exclude-libs=libisac_neon.a', | 4758 '-Wl,--exclude-libs=libisac_neon.a', |
4759 '-Wl,--exclude-libs=libopus.a', | 4759 '-Wl,--exclude-libs=libopus.a', |
4760 '-Wl,--exclude-libs=libvpx.a', | 4760 '-Wl,--exclude-libs=libvpx.a', |
4761 ], | 4761 ], |
4762 'libraries': [ | 4762 'libraries': [ |
4763 '-l<(android_stlport_library)', | 4763 '-l<(android_libcpp_library)', |
| 4764 '-latomic', |
4764 # Manually link the libgcc.a that the cross compiler uses. | 4765 # Manually link the libgcc.a that the cross compiler uses. |
4765 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)', | 4766 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)', |
4766 '-lc', | 4767 '-lc', |
4767 '-ldl', | 4768 '-ldl', |
4768 '-lm', | 4769 '-lm', |
4769 ], | 4770 ], |
4770 'conditions': [ | 4771 'conditions': [ |
4771 ['component=="static_library"', { | 4772 ['component=="static_library"', { |
4772 'target_conditions': [ | 4773 'target_conditions': [ |
4773 ['use_native_jni_exports==0', { | 4774 ['use_native_jni_exports==0', { |
4774 # Use a linker version script to strip JNI exports from | 4775 # Use a linker version script to strip JNI exports from |
4775 # binaries which have not specifically asked to use them. | 4776 # binaries which have not specifically asked to use them. |
4776 'ldflags': [ | 4777 'ldflags': [ |
4777 '-Wl,--version-script=<!(cd <(DEPTH) && pwd -P)/build/andr
oid/android_no_jni_exports.lst', | 4778 '-Wl,--version-script=<!(cd <(DEPTH) && pwd -P)/build/andr
oid/android_no_jni_exports.lst', |
4778 ], | 4779 ], |
4779 }], | 4780 }], |
4780 ], | 4781 ], |
4781 }], | 4782 }], |
4782 ['clang==1', { | 4783 ['clang==1', { |
| 4784 'libraries!': [ |
| 4785 # Clang with libc++ does not require an explicit atomic |
| 4786 # library reference. |
| 4787 '-latomic', |
| 4788 ], |
4783 'cflags': [ | 4789 'cflags': [ |
4784 # Work around incompatibilities between bionic and clang | 4790 # Work around incompatibilities between bionic and clang |
4785 # headers. | 4791 # headers. |
4786 '-D__compiler_offsetof=__builtin_offsetof', | 4792 '-D__compiler_offsetof=__builtin_offsetof', |
4787 '-Dnan=__builtin_nan', | 4793 '-Dnan=__builtin_nan', |
4788 ], | 4794 ], |
4789 'conditions': [ | 4795 'conditions': [ |
4790 ['target_arch=="arm"', { | 4796 ['target_arch=="arm"', { |
4791 'cflags': [ | 4797 'cflags': [ |
4792 '-target arm-linux-androideabi', | 4798 '-target arm-linux-androideabi', |
(...skipping 1384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6177 # settings in target dicts. SYMROOT is a special case, because many other | 6183 # settings in target dicts. SYMROOT is a special case, because many other |
6178 # Xcode variables depend on it, including variables such as | 6184 # Xcode variables depend on it, including variables such as |
6179 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | 6185 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
6180 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the | 6186 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
6181 # files to appear (when present) in the UI as actual files and not red | 6187 # files to appear (when present) in the UI as actual files and not red |
6182 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, | 6188 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
6183 # and therefore SYMROOT, needs to be set at the project level. | 6189 # and therefore SYMROOT, needs to be set at the project level. |
6184 'SYMROOT': '<(DEPTH)/xcodebuild', | 6190 'SYMROOT': '<(DEPTH)/xcodebuild', |
6185 }, | 6191 }, |
6186 } | 6192 } |
OLD | NEW |