Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Side by Side Diff: build/common.gypi

Issue 691783003: [WIP NOT FOR COMMIT] Switch Android to libc++ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 2708 matching lines...) Expand 10 before | Expand all | Expand 10 after
4469 ['OS=="android"', { 4470 ['OS=="android"', {
4470 'variables': { 4471 'variables': {
4471 # This is a unique identifier for a given build. It's used for 4472 # This is a unique identifier for a given build. It's used for
4472 # identifying various build artifacts corresponding to a particular 4473 # identifying various build artifacts corresponding to a particular
4473 # build of chrome (e.g. where to find archived symbols). 4474 # build of chrome (e.g. where to find archived symbols).
4474 'chrome_build_id%': '', 4475 'chrome_build_id%': '',
4475 'conditions': [ 4476 'conditions': [
4476 # Figure this out early since it needs symbols from libgcc.a, so it 4477 # Figure this out early since it needs symbols from libgcc.a, so it
4477 # has to be before that in the set of libraries. 4478 # has to be before that in the set of libraries.
4478 ['component=="shared_library"', { 4479 ['component=="shared_library"', {
4479 'android_stlport_library': 'stlport_shared', 4480 'android_libcpp_library': 'c++_shared',
4480 }, { 4481 }, {
4481 'android_stlport_library': 'stlport_static', 4482 'android_libcpp_library': 'c++_static',
4482 }], 4483 }],
4483 ], 4484 ],
4484 4485
4485 # Placing this variable here prevents from forking libvpx, used 4486 # Placing this variable here prevents from forking libvpx, used
4486 # by remoting. Remoting is off, so it needn't built, 4487 # by remoting. Remoting is off, so it needn't built,
4487 # so forking it's deps seems like overkill. 4488 # so forking it's deps seems like overkill.
4488 # But this variable need defined to properly run gyp. 4489 # But this variable need defined to properly run gyp.
4489 # A proper solution is to have an OS==android conditional 4490 # A proper solution is to have an OS==android conditional
4490 # in third_party/libvpx/libvpx.gyp to define it. 4491 # in third_party/libvpx/libvpx.gyp to define it.
4491 'libvpx_path': 'lib/linux/arm', 4492 'libvpx_path': 'lib/linux/arm',
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
4555 '-g', 4556 '-g',
4556 '-fstack-protector', 4557 '-fstack-protector',
4557 '-fno-short-enums', 4558 '-fno-short-enums',
4558 '-finline-limit=64', 4559 '-finline-limit=64',
4559 '-Wa,--noexecstack', 4560 '-Wa,--noexecstack',
4560 '<@(release_extra_cflags)', 4561 '<@(release_extra_cflags)',
4561 ], 4562 ],
4562 'defines': [ 4563 'defines': [
4563 'ANDROID', 4564 'ANDROID',
4564 '__GNU_SOURCE=1', # Necessary for clone() 4565 '__GNU_SOURCE=1', # Necessary for clone()
4565 'USE_STLPORT=1',
4566 '_STLP_USE_PTR_SPECIALIZATIONS=1',
4567 'CHROME_BUILD_ID="<(chrome_build_id)"', 4566 'CHROME_BUILD_ID="<(chrome_build_id)"',
4568 ], 4567 ],
4569 'ldflags!': [ 4568 'ldflags!': [
4570 '-pthread', # Not supported by Android toolchain. 4569 '-pthread', # Not supported by Android toolchain.
4571 ], 4570 ],
4572 'ldflags': [ 4571 'ldflags': [
4573 '-Wl,--no-undefined', 4572 '-Wl,--no-undefined',
4574 ], 4573 ],
4575 'conditions': [ 4574 'conditions': [
4576 ['component=="static_library"', { 4575 ['component=="static_library"', {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
4649 'variables': { 4648 'variables': {
4650 'conditions': [ 4649 'conditions': [
4651 ['target_arch=="arm" and arm_thumb==1', { 4650 ['target_arch=="arm" and arm_thumb==1', {
4652 'thumb_option%': '-mthumb', 4651 'thumb_option%': '-mthumb',
4653 }, { 4652 }, {
4654 'thumb_option%': '', 4653 'thumb_option%': '',
4655 }], 4654 }],
4656 ], 4655 ],
4657 }, 4656 },
4658 'libraries': [ 4657 'libraries': [
4659 '-l<(android_stlport_library)', 4658 '-l<(android_libcpp_library)',
4659 '-latomic',
4660 # Manually link the libgcc.a that the cross compiler uses. 4660 # Manually link the libgcc.a that the cross compiler uses.
4661 '<!(<(android_toolchain)/*-gcc <(thumb_option) -print-libgcc-f ile-name)', 4661 '<!(<(android_toolchain)/*-gcc <(thumb_option) -print-libgcc-f ile-name)',
4662 '-lm',
4662 '-lc', 4663 '-lc',
4663 '-ldl', 4664 '-ldl',
4664 '-lm',
4665 ], 4665 ],
4666 }], 4666 }],
4667 ['android_webview_build==1', { 4667 ['android_webview_build==1', {
4668 'cflags': [ 4668 'cflags': [
4669 # Android predefines this as 1; undefine it here so Chromium 4669 # Android predefines this as 1; undefine it here so Chromium
4670 # can redefine it later to be 2 for chromium code and unset 4670 # can redefine it later to be 2 for chromium code and unset
4671 # for third party code. This works because cflags are added 4671 # for third party code. This works because cflags are added
4672 # before defines. 4672 # before defines.
4673 '-U_FORTIFY_SOURCE', 4673 '-U_FORTIFY_SOURCE',
4674 # Disable any additional warnings enabled by the Android build system but which 4674 # Disable any additional warnings enabled by the Android build system but which
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
4706 ], 4706 ],
4707 }], 4707 }],
4708 ], 4708 ],
4709 }], 4709 }],
4710 ['target_arch == "arm"', { 4710 ['target_arch == "arm"', {
4711 'ldflags': [ 4711 'ldflags': [
4712 # Enable identical code folding to reduce size. 4712 # Enable identical code folding to reduce size.
4713 '-Wl,--icf=safe', 4713 '-Wl,--icf=safe',
4714 ], 4714 ],
4715 }], 4715 }],
4716 # NOTE: The stlport header include paths below are specified in
4717 # cflags rather than include_dirs because they need to come
4718 # after include_dirs. Think of them like system headers, but
4719 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
4720 # toolchain (circa Gingerbread) will exhibit strange errors.
4721 # The include ordering here is important; change with caution.
4722 ['android_webview_build==0', { 4716 ['android_webview_build==0', {
4723 'cflags': [ 4717 'cflags': [
4724 '-isystem<(android_stlport_include)', 4718 '-isystem<(android_libcpp_include)',
4719 '-isystem<(android_ndk_root)/sources/cxx-stl/llvm-libc++abi/li bcxxabi/include',
4720 '-isystem<(android_ndk_root)/sources/android/support/include',
4725 ], 4721 ],
4726 'conditions': [ 4722 'conditions': [
4727 ['target_arch=="arm" and arm_thumb==1', { 4723 ['target_arch=="arm" and arm_thumb==1', {
4728 'ldflags': [ '-L<(android_stlport_libs_dir)/thumb' ] 4724 'ldflags': [ '-L<(android_libcpp_libs_dir)/thumb' ]
4729 }, { 4725 }, {
4730 'ldflags': [ '-L<(android_stlport_libs_dir)' ] 4726 'ldflags': [ '-L<(android_libcpp_libs_dir)']
4731 }], 4727 }],
4732 ], 4728 ],
4733 }, { # else: android_webview_build!=0 4729 }, { # else: android_webview_build!=0
4734 'aosp_build_settings': { 4730 'aosp_build_settings': {
4735 # Specify that we want to statically link stlport from the 4731 # Specify that we want to statically link libc++ from the
4736 # NDK. This will provide all the include and library paths 4732 # NDK. This will provide all the include and library paths
4737 # automatically at build time, and link the right library. 4733 # automatically at build time, and link the right library.
4738 'LOCAL_NDK_STL_VARIANT': 'stlport_static', 4734 'LOCAL_NDK_STL_VARIANT': 'c++_static',
4739 }, 4735 },
4740 }], 4736 }],
4741 ['target_arch=="ia32"', { 4737 ['target_arch=="ia32"', {
4742 # The x86 toolchain currently has problems with stack-protector. 4738 # The x86 toolchain currently has problems with stack-protector.
4743 'cflags!': [ 4739 'cflags!': [
4744 '-fstack-protector', 4740 '-fstack-protector',
4745 ], 4741 ],
4746 'cflags': [ 4742 'cflags': [
4747 '-fno-stack-protector', 4743 '-fno-stack-protector',
4748 ], 4744 ],
(...skipping 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after
5910 # settings in target dicts. SYMROOT is a special case, because many other 5906 # settings in target dicts. SYMROOT is a special case, because many other
5911 # Xcode variables depend on it, including variables such as 5907 # Xcode variables depend on it, including variables such as
5912 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 5908 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
5913 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 5909 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
5914 # files to appear (when present) in the UI as actual files and not red 5910 # files to appear (when present) in the UI as actual files and not red
5915 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 5911 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
5916 # and therefore SYMROOT, needs to be set at the project level. 5912 # and therefore SYMROOT, needs to be set at the project level.
5917 'SYMROOT': '<(DEPTH)/xcodebuild', 5913 'SYMROOT': '<(DEPTH)/xcodebuild',
5918 }, 5914 },
5919 } 5915 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698