| 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 1653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1664 'android_host_arch%': '<!(uname -m)', | 1664 'android_host_arch%': '<!(uname -m)', |
| 1665 # Android API-level of the SDK used for compilation. | 1665 # Android API-level of the SDK used for compilation. |
| 1666 'android_sdk_version%': '21', | 1666 'android_sdk_version%': '21', |
| 1667 'android_sdk_build_tools_version%': '21.0.1', | 1667 'android_sdk_build_tools_version%': '21.0.1', |
| 1668 'host_os%': "<!(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')", | 1668 'host_os%': "<!(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')", |
| 1669 }, | 1669 }, |
| 1670 # Copy conditionally-set variables out one scope. | 1670 # Copy conditionally-set variables out one scope. |
| 1671 'android_ndk_root%': '<(android_ndk_root)', | 1671 'android_ndk_root%': '<(android_ndk_root)', |
| 1672 'android_sdk_root%': '<(android_sdk_root)', | 1672 'android_sdk_root%': '<(android_sdk_root)', |
| 1673 'android_sdk_version%': '<(android_sdk_version)', | 1673 'android_sdk_version%': '<(android_sdk_version)', |
| 1674 'android_stlport_root': '<(android_ndk_root)/sources/cxx-stl/stlport', | 1674 'android_libcpp_root': '<(android_ndk_root)/sources/cxx-stl/llvm-libc+
+', |
| 1675 'host_os%': '<(host_os)', | 1675 'host_os%': '<(host_os)', |
| 1676 | 1676 |
| 1677 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_v
ersion)', | 1677 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_v
ersion)', |
| 1678 # Android SDK build tools (e.g. dx, aapt, aidl) | 1678 # Android SDK build tools (e.g. dx, aapt, aidl) |
| 1679 'android_sdk_tools%': '<(android_sdk_root)/build-tools/<(android_sdk_b
uild_tools_version)', | 1679 'android_sdk_tools%': '<(android_sdk_root)/build-tools/<(android_sdk_b
uild_tools_version)', |
| 1680 | 1680 |
| 1681 # Android API level 14 is ICS (Android 4.0) which is the minimum | 1681 # Android API level 14 is ICS (Android 4.0) which is the minimum |
| 1682 # platform requirement for Chrome on Android, we use it for native | 1682 # platform requirement for Chrome on Android, we use it for native |
| 1683 # code compilation. | 1683 # code compilation. |
| 1684 'conditions': [ | 1684 'conditions': [ |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1741 'android_sdk_root%': '<(android_sdk_root)', | 1741 'android_sdk_root%': '<(android_sdk_root)', |
| 1742 'android_sdk_version%': '<(android_sdk_version)', | 1742 'android_sdk_version%': '<(android_sdk_version)', |
| 1743 'android_toolchain%': '<(android_toolchain)', | 1743 'android_toolchain%': '<(android_toolchain)', |
| 1744 | 1744 |
| 1745 'android_ndk_include': '<(android_ndk_sysroot)/usr/include', | 1745 'android_ndk_include': '<(android_ndk_sysroot)/usr/include', |
| 1746 'android_ndk_lib': '<(android_ndk_sysroot)/<(android_ndk_lib_dir)', | 1746 'android_ndk_lib': '<(android_ndk_sysroot)/<(android_ndk_lib_dir)', |
| 1747 'android_sdk_tools%': '<(android_sdk_tools)', | 1747 'android_sdk_tools%': '<(android_sdk_tools)', |
| 1748 'android_sdk%': '<(android_sdk)', | 1748 'android_sdk%': '<(android_sdk)', |
| 1749 'android_sdk_jar%': '<(android_sdk)/android.jar', | 1749 'android_sdk_jar%': '<(android_sdk)/android.jar', |
| 1750 | 1750 |
| 1751 'android_stlport_root': '<(android_stlport_root)', | 1751 'android_libcpp_root': '<(android_libcpp_root)', |
| 1752 'android_stlport_include': '<(android_stlport_root)/stlport', | 1752 'android_libcpp_include': '<(android_libcpp_root)/libcxx/include', |
| 1753 'android_stlport_libs_dir': '<(android_stlport_root)/libs/<(android_app_
abi)', | 1753 'android_libcpp_libs_dir': '<(android_libcpp_root)/libs/<(android_app_ab
i)', |
| 1754 |
| 1754 'host_os%': '<(host_os)', | 1755 'host_os%': '<(host_os)', |
| 1755 | 1756 |
| 1756 # Location of the "objcopy" binary, used by both gyp and scripts. | 1757 # Location of the "objcopy" binary, used by both gyp and scripts. |
| 1757 'android_objcopy%' : '<!(/bin/echo -n <(android_toolchain)/*-objcopy)', | 1758 'android_objcopy%' : '<!(/bin/echo -n <(android_toolchain)/*-objcopy)', |
| 1758 | 1759 |
| 1759 # Location of the "strip" binary, used by both gyp and scripts. | 1760 # Location of the "strip" binary, used by both gyp and scripts. |
| 1760 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)', | 1761 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)', |
| 1761 | 1762 |
| 1762 # Location of the "readelf" binary. | 1763 # Location of the "readelf" binary. |
| 1763 'android_readelf%' : '<!(/bin/echo -n <(android_toolchain)/*-readelf)', | 1764 'android_readelf%' : '<!(/bin/echo -n <(android_toolchain)/*-readelf)', |
| (...skipping 2710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4474 ['OS=="android"', { | 4475 ['OS=="android"', { |
| 4475 'variables': { | 4476 'variables': { |
| 4476 # This is a unique identifier for a given build. It's used for | 4477 # This is a unique identifier for a given build. It's used for |
| 4477 # identifying various build artifacts corresponding to a particular | 4478 # identifying various build artifacts corresponding to a particular |
| 4478 # build of chrome (e.g. where to find archived symbols). | 4479 # build of chrome (e.g. where to find archived symbols). |
| 4479 'chrome_build_id%': '', | 4480 'chrome_build_id%': '', |
| 4480 'conditions': [ | 4481 'conditions': [ |
| 4481 # Figure this out early since it needs symbols from libgcc.a, so it | 4482 # Figure this out early since it needs symbols from libgcc.a, so it |
| 4482 # has to be before that in the set of libraries. | 4483 # has to be before that in the set of libraries. |
| 4483 ['component=="shared_library"', { | 4484 ['component=="shared_library"', { |
| 4484 'android_stlport_library': 'stlport_shared', | 4485 'android_libcpp_library': 'c++_shared', |
| 4485 }, { | 4486 }, { |
| 4486 'android_stlport_library': 'stlport_static', | 4487 'android_libcpp_library': 'c++_static', |
| 4487 }], | 4488 }], |
| 4488 ], | 4489 ], |
| 4489 | 4490 |
| 4490 # Placing this variable here prevents from forking libvpx, used | 4491 # Placing this variable here prevents from forking libvpx, used |
| 4491 # by remoting. Remoting is off, so it needn't built, | 4492 # by remoting. Remoting is off, so it needn't built, |
| 4492 # so forking it's deps seems like overkill. | 4493 # so forking it's deps seems like overkill. |
| 4493 # But this variable need defined to properly run gyp. | 4494 # But this variable need defined to properly run gyp. |
| 4494 # A proper solution is to have an OS==android conditional | 4495 # A proper solution is to have an OS==android conditional |
| 4495 # in third_party/libvpx/libvpx.gyp to define it. | 4496 # in third_party/libvpx/libvpx.gyp to define it. |
| 4496 'libvpx_path': 'lib/linux/arm', | 4497 'libvpx_path': 'lib/linux/arm', |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4560 '-g', | 4561 '-g', |
| 4561 '-fstack-protector', | 4562 '-fstack-protector', |
| 4562 '-fno-short-enums', | 4563 '-fno-short-enums', |
| 4563 '-finline-limit=64', | 4564 '-finline-limit=64', |
| 4564 '-Wa,--noexecstack', | 4565 '-Wa,--noexecstack', |
| 4565 '<@(release_extra_cflags)', | 4566 '<@(release_extra_cflags)', |
| 4566 ], | 4567 ], |
| 4567 'defines': [ | 4568 'defines': [ |
| 4568 'ANDROID', | 4569 'ANDROID', |
| 4569 '__GNU_SOURCE=1', # Necessary for clone() | 4570 '__GNU_SOURCE=1', # Necessary for clone() |
| 4570 'USE_STLPORT=1', | |
| 4571 '_STLP_USE_PTR_SPECIALIZATIONS=1', | |
| 4572 'CHROME_BUILD_ID="<(chrome_build_id)"', | 4571 'CHROME_BUILD_ID="<(chrome_build_id)"', |
| 4573 ], | 4572 ], |
| 4574 'ldflags!': [ | 4573 'ldflags!': [ |
| 4575 '-pthread', # Not supported by Android toolchain. | 4574 '-pthread', # Not supported by Android toolchain. |
| 4576 ], | 4575 ], |
| 4577 'ldflags': [ | 4576 'ldflags': [ |
| 4578 '-Wl,--no-undefined', | 4577 '-Wl,--no-undefined', |
| 4579 ], | 4578 ], |
| 4580 'conditions': [ | 4579 'conditions': [ |
| 4581 ['component=="static_library"', { | 4580 ['component=="static_library"', { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4635 'HAVE_SYS_UIO_H', | 4634 'HAVE_SYS_UIO_H', |
| 4636 ], | 4635 ], |
| 4637 'cflags': [ | 4636 'cflags': [ |
| 4638 '--sysroot=<(android_ndk_sysroot)', | 4637 '--sysroot=<(android_ndk_sysroot)', |
| 4639 ], | 4638 ], |
| 4640 'ldflags': [ | 4639 'ldflags': [ |
| 4641 '--sysroot=<(android_ndk_sysroot)', | 4640 '--sysroot=<(android_ndk_sysroot)', |
| 4642 '-nostdlib', | 4641 '-nostdlib', |
| 4643 ], | 4642 ], |
| 4644 'libraries': [ | 4643 'libraries': [ |
| 4645 '-l<(android_stlport_library)', | 4644 '-l<(android_libcpp_library)', |
| 4645 '-latomic', |
| 4646 # Manually link the libgcc.a that the cross compiler uses. | 4646 # Manually link the libgcc.a that the cross compiler uses. |
| 4647 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)', | 4647 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)', |
| 4648 '-lm', |
| 4648 '-lc', | 4649 '-lc', |
| 4649 '-ldl', | 4650 '-ldl', |
| 4650 '-lm', | |
| 4651 ], | 4651 ], |
| 4652 }], | 4652 }], |
| 4653 ['android_webview_build==1', { | 4653 ['android_webview_build==1', { |
| 4654 'cflags': [ | 4654 'cflags': [ |
| 4655 # Android predefines this as 1; undefine it here so Chromium | 4655 # Android predefines this as 1; undefine it here so Chromium |
| 4656 # can redefine it later to be 2 for chromium code and unset | 4656 # can redefine it later to be 2 for chromium code and unset |
| 4657 # for third party code. This works because cflags are added | 4657 # for third party code. This works because cflags are added |
| 4658 # before defines. | 4658 # before defines. |
| 4659 '-U_FORTIFY_SOURCE', | 4659 '-U_FORTIFY_SOURCE', |
| 4660 # Disable any additional warnings enabled by the Android build
system but which | 4660 # 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 ], | 4692 ], |
| 4693 }], | 4693 }], |
| 4694 ], | 4694 ], |
| 4695 }], | 4695 }], |
| 4696 ['target_arch == "arm" and order_profiling==0', { | 4696 ['target_arch == "arm" and order_profiling==0', { |
| 4697 'ldflags': [ | 4697 'ldflags': [ |
| 4698 # Enable identical code folding to reduce size. | 4698 # Enable identical code folding to reduce size. |
| 4699 '-Wl,--icf=safe', | 4699 '-Wl,--icf=safe', |
| 4700 ], | 4700 ], |
| 4701 }], | 4701 }], |
| 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', { | 4702 ['android_webview_build==0', { |
| 4709 'cflags': [ | 4703 'cflags': [ |
| 4710 '-isystem<(android_stlport_include)', | 4704 '-isystem<(android_libcpp_include)', |
| 4705 '-isystem<(android_ndk_root)/sources/cxx-stl/llvm-libc++abi/li
bcxxabi/include', |
| 4706 '-isystem<(android_ndk_root)/sources/android/support/include', |
| 4711 ], | 4707 ], |
| 4712 'ldflags': [ | 4708 'ldflags': [ |
| 4713 '-L<(android_stlport_libs_dir)', | 4709 '-L<(android_libcpp_libs_dir)', |
| 4714 ], | 4710 ], |
| 4715 }, { # else: android_webview_build!=0 | 4711 }, { # else: android_webview_build!=0 |
| 4716 'aosp_build_settings': { | 4712 'aosp_build_settings': { |
| 4717 # Specify that we want to statically link stlport from the | 4713 # Specify that we want to statically link libc++ from the |
| 4718 # NDK. This will provide all the include and library paths | 4714 # NDK. This will provide all the include and library paths |
| 4719 # automatically at build time, and link the right library. | 4715 # automatically at build time, and link the right library. |
| 4720 'LOCAL_NDK_STL_VARIANT': 'stlport_static', | 4716 'LOCAL_NDK_STL_VARIANT': 'c++_static', |
| 4721 }, | 4717 }, |
| 4722 }], | 4718 }], |
| 4723 ['target_arch=="ia32"', { | 4719 ['target_arch=="ia32"', { |
| 4724 # The x86 toolchain currently has problems with stack-protector. | 4720 # The x86 toolchain currently has problems with stack-protector. |
| 4725 'cflags!': [ | 4721 'cflags!': [ |
| 4726 '-fstack-protector', | 4722 '-fstack-protector', |
| 4727 ], | 4723 ], |
| 4728 'cflags': [ | 4724 'cflags': [ |
| 4729 '-fno-stack-protector', | 4725 '-fno-stack-protector', |
| 4730 ], | 4726 ], |
| (...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5839 # settings in target dicts. SYMROOT is a special case, because many other | 5835 # settings in target dicts. SYMROOT is a special case, because many other |
| 5840 # Xcode variables depend on it, including variables such as | 5836 # Xcode variables depend on it, including variables such as |
| 5841 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | 5837 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
| 5842 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the | 5838 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
| 5843 # files to appear (when present) in the UI as actual files and not red | 5839 # files to appear (when present) in the UI as actual files and not red |
| 5844 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, | 5840 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
| 5845 # and therefore SYMROOT, needs to be set at the project level. | 5841 # and therefore SYMROOT, needs to be set at the project level. |
| 5846 'SYMROOT': '<(DEPTH)/xcodebuild', | 5842 'SYMROOT': '<(DEPTH)/xcodebuild', |
| 5847 }, | 5843 }, |
| 5848 } | 5844 } |
| OLD | NEW |