History log of /ndk/sources/cxx-stl/llvm-libc++/libcxx/src/new.cpp
Revision Date Author Comments
837ecf801d102042e63827d8e89e3213f0c90493 13-Jun-2014 Andrew Hsieh <andrewhsieh@google.com> Update android/support, llvm-libc++ and llvm-libc++abi

Merge fixes done in https://github.com/awong-dev/ndk (*1) during recent
NDK/libc++ Hackathon, plus some local changes for 64-bit.

(*) List of contributors:
Albert J. Wong <ajwong@google.com>
Antoine Labour <piman@chromium.org>
Dana Jansens <danakj@chromium.org>
David Turner <digit@android.com>
Egor Pasko <pasko@chromium.org>
Jonathan Roelofs <jonathan@codesourcery.com>
Logan Chien <logan.chien@mediatek.com>
Nico Weber <nicolasweber@gmx.de>
Philippe Liard <pliard@chromium.org>
William Chan <willchan@gmail.com>

Change-Id: I652780ae7155545c843edb1172920773287015c1
5de42e6621b3d0131472c3f8838b7f0ccf3e8963 22-Oct-2013 Andrew Hsieh <andrewhsieh@google.com> Update libc++ to upstream revision r201101

To catch fixes since last update (r186119) which fails clang3.4
on containers/associative/map/map.modifiers/emplace_hint.pass.cpp
with error reads:

.../tuple:320:11: error:
rvalue reference to type 'double' cannot bind to lvalue of type 'double'
: value(__t.get())
^ ~~~~~~~~~
.../tuple:444:8: note:
in instantiation of member function 'std::__1::__tuple_leaf<1, double &&, false>::__tuple_leaf' requested here
struct __tuple_impl<__tuple_indices<_Indx...>, _Tp...>
^
emplace_hint.pass.cpp:69:42: note: in instantiation of function template specialization 'std::__1::forward_as_tuple<int, double>' requested
here
std::forward_as_tuple(2, 3.5));
^

Now clang3.4 test results are same as clang3.3

### clang3.4 armeabi-v7a
...
Target: armv5te-none-linux-androideabi
Thread model: posix
with -std=c++11 -O0 -g -march=armv7-a -mthumb -mfpu=vfpv3-d16 -march=armv7-a -mthumb -Wl,--fix-cortex-a8 -I/usr/local/google/home/andrewhsieh/mydroid/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/support -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS
...
number of tests failed : 123
number of tests passed : 4522
+ ----
total number of tests : 4645

### clang3.4 x86
...
using clang version 3.4 (https://bitbucket.org/loganchien/clang c34bb12af3af42f671296cdb978b34b931062d2a) (https://bitbucket.org/loganchien/llvm d09f2eff406d17c86d51db7660bd374cf092e6ed)
Target: i686-none-linux-android
Thread model: posix
with -std=c++11 -O0 -g -I/usr/local/google/home/andrewhsieh/mydroid/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/support -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS
...
number of tests failed : 125
number of tests passed : 4520
+ ----
total number of tests : 4645

### clang3.4 mips
...
Target: mipsel-none-linux-android
Thread model: posix
with -std=c++11 -O0 -g -I/usr/local/google/home/andrewhsieh/mydroid/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/support -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS
...
number of tests failed : 122
number of tests passed : 4523
+ ----
total number of tests : 4645

Change-Id: I3a0aa734b9f07abf15774bfe1d687d9de5e3a4a9
1f84cd1e9227b6b98784f0a4371cc0eda7ddf6b5 10-Jan-2014 Andrew Hsieh <andrewhsieh@google.com> Fix gabi++/stlport/llvm-libc++ build

Supplement https://android-review.googlesource.com/#/c/73447/ with
the following

1. Add src/stdexcept.cc to sources/cxx-stl/gabi++/sources.mk, but
2. Guard src/stdexcept.cc with LIBCXXABI
3. #include <cxxabi.h> for __ANDROID__

Change-Id: Ifc0dc9cf9927c4d3151d3d8bd29779588a82c683
92f1ee6990752f26aebdbbfb5a87c474d3edd1e0 31-Dec-2013 Albert J. Wong <ajwong@google.com> Fix new.delete tests by correcting link methodology. Replace GABIXX_LIBCXX with LIBCXXABI.

Removed -Bsymbolic. Specified -O0 in testit_android because the optimizations
make some of the tests fail. Also replaced GABIXX_LIBCXX with LIBCXXABI
and gabi++ to reflect libc++abi, not libc++rt.

The linking of libc++_shared.so incorreclty specified -Bsymbolic
which, aside from causing issues with rtti and exception handlers,
also makes the default implementations of the array operator new,
and the single-object no-throw variant (both of which wrap the normal
single-object new) link directly to the single-object new rather than
jump through the PLT. This means that even if you override
single-object new, the default implementations of these other new
operators will NOT find the override. Bad bad bad.

Ideally, this should use -Bsymbolic-functions with
--dynamic-list-cpp-new and --dynamic-list-cpp-typeinfo so that the
linker can avoid a plt jump for most lookups, but somehow even with
the dynamic-list settings, the operator new/delete functions were
skipping the plt jump. Removed all of these options for now.

willchan, danakj, and thakis contributed to this patch.

BUG=36496

Change-Id: Iaaa25de365b6444e49ceaadaf9d0b1f442b9c85d
d541f971c9be70175964d4174e1c2417c18321d0 01-Oct-2013 Andrew Hsieh <andrewhsieh@google.com> Misc fix libc++

This CL contains growing list of misc fixes during the first pass
of fail tests analysis.

Change-Id: I8999ac279f3dc80939c70a4bd563b57462fb5401
a8bf9de8057ad254cc642f33bd7d0a48dc1ae55c 02-May-2013 David 'Digit' Turner <digit@android.com> Update libc++ sources to @180916

This patches updates the llvm libc++ in the following way:

1/ Move all llvm-specific sources from .../llvm-libc++/ to
.../llvm-libc++/libcxx/

2/ Move .../android/README to .../README.NDK and update it
with upstream/patch information.

3/ Add .../patches.android containing the list of Android-specific
patches used to generate the content of libcxx/ after checking
out the upstream version of the sources.

4/ Move .../android/llvm/libc++/Android.mk to .../Android.mk

5/ Move .../include/support/android/ to .../android/support/include/
and .../src/support/android/ to .../android/support/src/

It's likely that this will go into another helper static
library at some point, since it provides missing C library
functions that could benefit other programs.

This move makes updating the support code easier since it
doesn't require changing the content of patches.android/
each time.

Apart from that, there is no drastic change here in features / bugs,
the test program still links but the library probably doesn't do
much and will crash easily.

Change-Id: I953cc528ba3d0199b5947ef3dbdcbfedfb25f3e8