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 1648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1659 'android_host_arch%': '<!(uname -m)', | 1659 'android_host_arch%': '<!(uname -m)', |
1660 # Android API-level of the SDK used for compilation. | 1660 # Android API-level of the SDK used for compilation. |
1661 'android_sdk_version%': '21', | 1661 'android_sdk_version%': '21', |
1662 'android_sdk_build_tools_version%': '21.0.1', | 1662 'android_sdk_build_tools_version%': '21.0.1', |
1663 'host_os%': "<!(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')", | 1663 'host_os%': "<!(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')", |
1664 }, | 1664 }, |
1665 # Copy conditionally-set variables out one scope. | 1665 # Copy conditionally-set variables out one scope. |
1666 'android_ndk_root%': '<(android_ndk_root)', | 1666 'android_ndk_root%': '<(android_ndk_root)', |
1667 'android_sdk_root%': '<(android_sdk_root)', | 1667 'android_sdk_root%': '<(android_sdk_root)', |
1668 'android_sdk_version%': '<(android_sdk_version)', | 1668 'android_sdk_version%': '<(android_sdk_version)', |
1669 'android_stlport_root': '<(android_ndk_root)/sources/cxx-stl/stlport', | 1669 'android_libcpp_root': '<(android_ndk_root)/sources/cxx-stl/llvm-libc+
+', |
1670 'host_os%': '<(host_os)', | 1670 'host_os%': '<(host_os)', |
1671 | 1671 |
1672 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_v
ersion)', | 1672 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_v
ersion)', |
1673 # Android SDK build tools (e.g. dx, aapt, aidl) | 1673 # Android SDK build tools (e.g. dx, aapt, aidl) |
1674 'android_sdk_tools%': '<(android_sdk_root)/build-tools/<(android_sdk_b
uild_tools_version)', | 1674 'android_sdk_tools%': '<(android_sdk_root)/build-tools/<(android_sdk_b
uild_tools_version)', |
1675 | 1675 |
1676 # Android API level 14 is ICS (Android 4.0) which is the minimum | 1676 # Android API level 14 is ICS (Android 4.0) which is the minimum |
1677 # platform requirement for Chrome on Android, we use it for native | 1677 # platform requirement for Chrome on Android, we use it for native |
1678 # code compilation. | 1678 # code compilation. |
1679 'conditions': [ | 1679 'conditions': [ |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1736 'android_sdk_root%': '<(android_sdk_root)', | 1736 'android_sdk_root%': '<(android_sdk_root)', |
1737 'android_sdk_version%': '<(android_sdk_version)', | 1737 'android_sdk_version%': '<(android_sdk_version)', |
1738 'android_toolchain%': '<(android_toolchain)', | 1738 'android_toolchain%': '<(android_toolchain)', |
1739 | 1739 |
1740 'android_ndk_include': '<(android_ndk_sysroot)/usr/include', | 1740 'android_ndk_include': '<(android_ndk_sysroot)/usr/include', |
1741 'android_ndk_lib': '<(android_ndk_sysroot)/<(android_ndk_lib_dir)', | 1741 'android_ndk_lib': '<(android_ndk_sysroot)/<(android_ndk_lib_dir)', |
1742 'android_sdk_tools%': '<(android_sdk_tools)', | 1742 'android_sdk_tools%': '<(android_sdk_tools)', |
1743 'android_sdk%': '<(android_sdk)', | 1743 'android_sdk%': '<(android_sdk)', |
1744 'android_sdk_jar%': '<(android_sdk)/android.jar', | 1744 'android_sdk_jar%': '<(android_sdk)/android.jar', |
1745 | 1745 |
1746 'android_stlport_root': '<(android_stlport_root)', | 1746 'android_libcpp_root': '<(android_libcpp_root)', |
1747 'android_stlport_include': '<(android_stlport_root)/stlport', | 1747 'android_libcpp_include': '<(android_libcpp_root)/libcxx/include', |
1748 'android_stlport_libs_dir': '<(android_stlport_root)/libs/<(android_app_
abi)', | 1748 'android_libcpp_libs_dir': '<(android_libcpp_root)/libs/<(android_app_ab
i)', |
| 1749 |
1749 'host_os%': '<(host_os)', | 1750 'host_os%': '<(host_os)', |
1750 | 1751 |
1751 # Location of the "objcopy" binary, used by both gyp and scripts. | 1752 # Location of the "objcopy" binary, used by both gyp and scripts. |
1752 'android_objcopy%' : '<!(/bin/echo -n <(android_toolchain)/*-objcopy)', | 1753 'android_objcopy%' : '<!(/bin/echo -n <(android_toolchain)/*-objcopy)', |
1753 | 1754 |
1754 # Location of the "strip" binary, used by both gyp and scripts. | 1755 # Location of the "strip" binary, used by both gyp and scripts. |
1755 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)', | 1756 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)', |
1756 | 1757 |
1757 # Location of the "readelf" binary. | 1758 # Location of the "readelf" binary. |
1758 'android_readelf%' : '<!(/bin/echo -n <(android_toolchain)/*-readelf)', | 1759 'android_readelf%' : '<!(/bin/echo -n <(android_toolchain)/*-readelf)', |
(...skipping 2726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4485 ['OS=="android"', { | 4486 ['OS=="android"', { |
4486 'variables': { | 4487 'variables': { |
4487 # This is a unique identifier for a given build. It's used for | 4488 # This is a unique identifier for a given build. It's used for |
4488 # identifying various build artifacts corresponding to a particular | 4489 # identifying various build artifacts corresponding to a particular |
4489 # build of chrome (e.g. where to find archived symbols). | 4490 # build of chrome (e.g. where to find archived symbols). |
4490 'chrome_build_id%': '', | 4491 'chrome_build_id%': '', |
4491 'conditions': [ | 4492 'conditions': [ |
4492 # Figure this out early since it needs symbols from libgcc.a, so it | 4493 # Figure this out early since it needs symbols from libgcc.a, so it |
4493 # has to be before that in the set of libraries. | 4494 # has to be before that in the set of libraries. |
4494 ['component=="shared_library"', { | 4495 ['component=="shared_library"', { |
4495 'android_stlport_library': 'stlport_shared', | 4496 'android_libcpp_library': 'c++_shared', |
4496 }, { | 4497 }, { |
4497 'android_stlport_library': 'stlport_static', | 4498 'android_libcpp_library': 'c++_static', |
4498 }], | 4499 }], |
4499 ], | 4500 ], |
4500 | 4501 |
4501 # Placing this variable here prevents from forking libvpx, used | 4502 # Placing this variable here prevents from forking libvpx, used |
4502 # by remoting. Remoting is off, so it needn't built, | 4503 # by remoting. Remoting is off, so it needn't built, |
4503 # so forking it's deps seems like overkill. | 4504 # so forking it's deps seems like overkill. |
4504 # But this variable need defined to properly run gyp. | 4505 # But this variable need defined to properly run gyp. |
4505 # A proper solution is to have an OS==android conditional | 4506 # A proper solution is to have an OS==android conditional |
4506 # in third_party/libvpx/libvpx.gyp to define it. | 4507 # in third_party/libvpx/libvpx.gyp to define it. |
4507 'libvpx_path': 'lib/linux/arm', | 4508 'libvpx_path': 'lib/linux/arm', |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4571 '-g', | 4572 '-g', |
4572 '-fstack-protector', | 4573 '-fstack-protector', |
4573 '-fno-short-enums', | 4574 '-fno-short-enums', |
4574 '-finline-limit=64', | 4575 '-finline-limit=64', |
4575 '-Wa,--noexecstack', | 4576 '-Wa,--noexecstack', |
4576 '<@(release_extra_cflags)', | 4577 '<@(release_extra_cflags)', |
4577 ], | 4578 ], |
4578 'defines': [ | 4579 'defines': [ |
4579 'ANDROID', | 4580 'ANDROID', |
4580 '__GNU_SOURCE=1', # Necessary for clone() | 4581 '__GNU_SOURCE=1', # Necessary for clone() |
4581 'USE_STLPORT=1', | |
4582 '_STLP_USE_PTR_SPECIALIZATIONS=1', | |
4583 'CHROME_BUILD_ID="<(chrome_build_id)"', | 4582 'CHROME_BUILD_ID="<(chrome_build_id)"', |
4584 ], | 4583 ], |
4585 'ldflags!': [ | 4584 'ldflags!': [ |
4586 '-pthread', # Not supported by Android toolchain. | 4585 '-pthread', # Not supported by Android toolchain. |
4587 ], | 4586 ], |
4588 'ldflags': [ | 4587 'ldflags': [ |
4589 '-Wl,--no-undefined', | 4588 '-Wl,--no-undefined', |
4590 ], | 4589 ], |
4591 'conditions': [ | 4590 'conditions': [ |
4592 ['component=="static_library"', { | 4591 ['component=="static_library"', { |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4646 'HAVE_SYS_UIO_H', | 4645 'HAVE_SYS_UIO_H', |
4647 ], | 4646 ], |
4648 'cflags': [ | 4647 'cflags': [ |
4649 '--sysroot=<(android_ndk_sysroot)', | 4648 '--sysroot=<(android_ndk_sysroot)', |
4650 ], | 4649 ], |
4651 'ldflags': [ | 4650 'ldflags': [ |
4652 '--sysroot=<(android_ndk_sysroot)', | 4651 '--sysroot=<(android_ndk_sysroot)', |
4653 '-nostdlib', | 4652 '-nostdlib', |
4654 ], | 4653 ], |
4655 'libraries': [ | 4654 'libraries': [ |
4656 '-l<(android_stlport_library)', | 4655 '-l<(android_libcpp_library)', |
| 4656 '-latomic', |
4657 # Manually link the libgcc.a that the cross compiler uses. | 4657 # Manually link the libgcc.a that the cross compiler uses. |
4658 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)', | 4658 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)', |
| 4659 '-lm', |
4659 '-lc', | 4660 '-lc', |
4660 '-ldl', | 4661 '-ldl', |
4661 '-lm', | |
4662 ], | 4662 ], |
4663 }], | 4663 }], |
4664 ['android_webview_build==1', { | 4664 ['android_webview_build==1', { |
4665 'cflags': [ | 4665 'cflags': [ |
4666 # Android predefines this as 1; undefine it here so Chromium | 4666 # Android predefines this as 1; undefine it here so Chromium |
4667 # can redefine it later to be 2 for chromium code and unset | 4667 # can redefine it later to be 2 for chromium code and unset |
4668 # for third party code. This works because cflags are added | 4668 # for third party code. This works because cflags are added |
4669 # before defines. | 4669 # before defines. |
4670 '-U_FORTIFY_SOURCE', | 4670 '-U_FORTIFY_SOURCE', |
4671 # Disable any additional warnings enabled by the Android build
system but which | 4671 # 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... |
4703 ], | 4703 ], |
4704 }], | 4704 }], |
4705 ], | 4705 ], |
4706 }], | 4706 }], |
4707 ['target_arch == "arm" and order_profiling==0', { | 4707 ['target_arch == "arm" and order_profiling==0', { |
4708 'ldflags': [ | 4708 'ldflags': [ |
4709 # Enable identical code folding to reduce size. | 4709 # Enable identical code folding to reduce size. |
4710 '-Wl,--icf=safe', | 4710 '-Wl,--icf=safe', |
4711 ], | 4711 ], |
4712 }], | 4712 }], |
4713 # NOTE: The stlport header include paths below are specified in | |
4714 # cflags rather than include_dirs because they need to come | |
4715 # after include_dirs. Think of them like system headers, but | |
4716 # don't use '-isystem' because the arm-linux-androideabi-4.4.3 | |
4717 # toolchain (circa Gingerbread) will exhibit strange errors. | |
4718 # The include ordering here is important; change with caution. | |
4719 ['android_webview_build==0', { | 4713 ['android_webview_build==0', { |
4720 'cflags': [ | 4714 'cflags': [ |
4721 '-isystem<(android_stlport_include)', | 4715 '-isystem<(android_libcpp_include)', |
| 4716 '-isystem<(android_ndk_root)/sources/cxx-stl/llvm-libc++abi/li
bcxxabi/include', |
| 4717 '-isystem<(android_ndk_root)/sources/android/support/include', |
4722 ], | 4718 ], |
4723 'ldflags': [ | 4719 'ldflags': [ |
4724 '-L<(android_stlport_libs_dir)', | 4720 '-L<(android_libcpp_libs_dir)', |
4725 ], | 4721 ], |
4726 }, { # else: android_webview_build!=0 | 4722 }, { # else: android_webview_build!=0 |
| 4723 'defines': [ |
| 4724 'USE_STLPORT=1', |
| 4725 '_STLP_USE_PTR_SPECIALIZATIONS=1', |
| 4726 ], |
4727 'aosp_build_settings': { | 4727 'aosp_build_settings': { |
4728 # Specify that we want to statically link stlport from the | 4728 # Specify that we want to statically link libc++ from the |
4729 # NDK. This will provide all the include and library paths | 4729 # NDK. This will provide all the include and library paths |
4730 # automatically at build time, and link the right library. | 4730 # automatically at build time, and link the right library. |
4731 'LOCAL_NDK_STL_VARIANT': 'stlport_static', | 4731 'LOCAL_NDK_STL_VARIANT': 'stlport_static', |
4732 }, | 4732 }, |
4733 }], | 4733 }], |
4734 ['target_arch=="ia32"', { | 4734 ['target_arch=="ia32"', { |
4735 # The x86 toolchain currently has problems with stack-protector. | 4735 # The x86 toolchain currently has problems with stack-protector. |
4736 'cflags!': [ | 4736 'cflags!': [ |
4737 '-fstack-protector', | 4737 '-fstack-protector', |
4738 ], | 4738 ], |
(...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5861 # settings in target dicts. SYMROOT is a special case, because many other | 5861 # settings in target dicts. SYMROOT is a special case, because many other |
5862 # Xcode variables depend on it, including variables such as | 5862 # Xcode variables depend on it, including variables such as |
5863 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | 5863 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
5864 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the | 5864 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
5865 # files to appear (when present) in the UI as actual files and not red | 5865 # files to appear (when present) in the UI as actual files and not red |
5866 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, | 5866 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
5867 # and therefore SYMROOT, needs to be set at the project level. | 5867 # and therefore SYMROOT, needs to be set at the project level. |
5868 'SYMROOT': '<(DEPTH)/xcodebuild', | 5868 'SYMROOT': '<(DEPTH)/xcodebuild', |
5869 }, | 5869 }, |
5870 } | 5870 } |
OLD | NEW |