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