Revert of Enable libc++ on Android (patchset #16 id:460001 of https://codereview.chromium.org/835633003/)

Reason for revert:
Slows down the slowest bot on CQ by 20 minutes.

BUG=456396

Original issue's description:
> Enable libc++ on Android
>
> Switch Chrome on Android to use libc++ instead of stlport. WebView AOSP
> builds will continue to use stlport for the time being.
>
> Note that this change is exploratory, and likely to be reverted before
> branch point (ensuring WebView and Chrome remain in lockstep with
> respect to standard library dependencies).
>
> BUG=427718
> TBR=cpu@chromium.org
>
> Committed: https://crrev.com/8681920fa22ded465054301ce96657a4ddaf2a04
> Cr-Commit-Position: refs/heads/master@{#315085}

TBR=fdegans@chromium.org,pasko@chromium.org,jamesr@chromium.org,thakis@chromium.org,boliu@chromium.org,davidben@chromium.org,cpu@chromium.org,piman@chromium.org,jdduke@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=427718

Review URL: https://codereview.chromium.org/903323002

Cr-Original-Commit-Position: refs/heads/master@{#315174}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f43ab9ce5b48ed622736d96c9fba9e8fa57858a3
This commit is contained in:
jam 2015-02-06 19:27:04 -08:00 коммит произвёл Commit bot
Родитель 30eac7b4cb
Коммит b71a43c4fc
4 изменённых файлов: 62 добавлений и 43 удалений

Просмотреть файл

@ -16,7 +16,7 @@
{
'destination': '<(SHARED_LIB_DIR)/',
'files': [
'<(android_libcpp_libs_dir)/libc++_shared.so',
'<(android_stlport_libs_dir)/libstlport_shared.so',
],
},
],

Просмотреть файл

@ -1668,7 +1668,7 @@
'android_ndk_root%': '<(android_ndk_root)',
'android_sdk_root%': '<(android_sdk_root)',
'android_sdk_version%': '<(android_sdk_version)',
'android_libcpp_root': '<(android_ndk_root)/sources/cxx-stl/llvm-libc++',
'android_stlport_root': '<(android_ndk_root)/sources/cxx-stl/stlport',
'host_os%': '<(host_os)',
'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_version)',
@ -1745,10 +1745,9 @@
'android_sdk%': '<(android_sdk)',
'android_sdk_jar%': '<(android_sdk)/android.jar',
'android_libcpp_root': '<(android_libcpp_root)',
'android_libcpp_include': '<(android_libcpp_root)/libcxx/include',
'android_libcpp_libs_dir': '<(android_libcpp_root)/libs/<(android_app_abi)',
'android_stlport_root': '<(android_stlport_root)',
'android_stlport_include': '<(android_stlport_root)/stlport',
'android_stlport_libs_dir': '<(android_stlport_root)/libs/<(android_app_abi)',
'host_os%': '<(host_os)',
# Location of the "objcopy" binary, used by both gyp and scripts.
@ -4501,9 +4500,9 @@
# Figure this out early since it needs symbols from libgcc.a, so it
# has to be before that in the set of libraries.
['component=="shared_library"', {
'android_libcpp_library': 'c++_shared',
'android_stlport_library': 'stlport_shared',
}, {
'android_libcpp_library': 'c++_static',
'android_stlport_library': 'stlport_static',
}],
],
@ -4587,6 +4586,8 @@
'defines': [
'ANDROID',
'__GNU_SOURCE=1', # Necessary for clone()
'USE_STLPORT=1',
'_STLP_USE_PTR_SPECIALIZATIONS=1',
'CHROME_BUILD_ID="<(chrome_build_id)"',
],
'ldflags!': [
@ -4660,13 +4661,12 @@
'-nostdlib',
],
'libraries': [
'-l<(android_libcpp_library)',
'-latomic',
'-l<(android_stlport_library)',
# Manually link the libgcc.a that the cross compiler uses.
'<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)',
'-lm',
'-lc',
'-ldl',
'-lm',
],
}],
['android_webview_build==1', {
@ -4718,20 +4718,20 @@
'-Wl,--icf=safe',
],
}],
# NOTE: The stlport header include paths below are specified in
# cflags rather than include_dirs because they need to come
# after include_dirs. Think of them like system headers, but
# don't use '-isystem' because the arm-linux-androideabi-4.4.3
# toolchain (circa Gingerbread) will exhibit strange errors.
# The include ordering here is important; change with caution.
['android_webview_build==0', {
'cflags': [
'-isystem<(android_libcpp_include)',
'-isystem<(android_ndk_root)/sources/cxx-stl/llvm-libc++abi/libcxxabi/include',
'-isystem<(android_ndk_root)/sources/android/support/include',
'-isystem<(android_stlport_include)',
],
'ldflags': [
'-L<(android_libcpp_libs_dir)',
'-L<(android_stlport_libs_dir)',
],
}, { # else: android_webview_build!=0
'defines': [
'USE_STLPORT=1',
'_STLP_USE_PTR_SPECIALIZATIONS=1',
],
'aosp_build_settings': {
# Specify that we want to statically link stlport from the
# NDK. This will provide all the include and library paths

Просмотреть файл

@ -129,6 +129,14 @@ if (is_android) {
android_gdbserver =
"$android_ndk_root/prebuilt/$android_prebuilt_arch/gdbserver/gdbserver"
# stlport stuff --------------------------------------------------------------
if (component_mode == "shared_library") {
android_stlport_library = "stlport_shared"
} else {
android_stlport_library = "stlport_static"
}
# ABI ------------------------------------------------------------------------
if (cpu_arch == "x86") {

Просмотреть файл

@ -531,7 +531,7 @@ config("runtime_library") {
]
}
# Android standard library setup.
# Stlport setup. Android uses a different (smaller) version of the STL.
if (is_android) {
if (is_clang) {
# Work around incompatibilities between bionic and clang headers.
@ -541,44 +541,55 @@ config("runtime_library") {
]
}
defines += [ "__GNU_SOURCE=1" ] # Necessary for clone().
defines += [
"USE_STLPORT=1",
"_STLP_USE_PTR_SPECIALIZATIONS=1",
"__GNU_SOURCE=1", # Necessary for clone().
]
ldflags += [
"-Wl,--warn-shared-textrel",
"-nostdlib",
]
android_libcpp_root = "$android_ndk_root/sources/cxx-stl/llvm-libc++"
# NOTE: The stlport header include paths below are specified in cflags
# rather than include_dirs because they need to come after include_dirs.
# Think of them like system headers, but don't use '-isystem' because the
# arm-linux-androideabi-4.4.3 toolchain (circa Gingerbread) will exhibit
# strange errors. The include ordering here is important; change with
# caution.
android_stlport_root = "$android_ndk_root/sources/cxx-stl/stlport"
cflags += [
"-isystem" +
rebase_path("$android_libcpp_root/libcxx/include", root_build_dir),
"-isystem" + rebase_path(
"$android_ndk_root/sources/cxx-stl/llvm-libc++abi/libcxxabi/include",
root_build_dir),
"-isystem" +
rebase_path("$android_ndk_root/sources/android/support/include",
root_build_dir),
]
lib_dirs += [ "$android_libcpp_root/libs/$android_app_abi" ]
cflags += [ "-isystem" +
rebase_path("$android_stlport_root/stlport", root_build_dir) ]
lib_dirs += [ "$android_stlport_root/libs/$android_app_abi" ]
if (component_mode == "shared_library") {
android_libcpp_library = "c++_shared"
libs += [ "stlport_shared" ]
} else {
android_libcpp_library = "c++_static"
libs += [ "stlport_static" ]
}
if (cpu_arch == "mipsel") {
libs += [
# ld linker is used for mips Android, and ld does not accept library
# absolute path prefixed by "-l"; Since libgcc does not exist in mips
# sysroot the proper library will be linked.
# TODO(gordanac): Remove once gold linker is used for mips Android.
"gcc",
]
} else {
libs += [
# Manually link the libgcc.a that the cross compiler uses. This is
# absolute because the linker will look inside the sysroot if it's not.
rebase_path(android_libgcc_file),
]
}
libs += [
"$android_libcpp_library",
"atomic",
# Manually link the libgcc.a that the cross compiler uses. This is
# absolute because the linker will look inside the sysroot if it's not.
rebase_path(android_libgcc_file),
"m",
"c",
"dl",
"m",
]
}
}