Enable building libc++abi with hidden visibility by default. The ABI mandated
interfaces (and a few extra) are already set up to be externally visible. This
allows us to ensure that any implementation details are not leaked.
llvm-svn: 270816
When building libcxxabi in tree (i.e. in llvm/projects/libcxxabi,
along with llvm/projects/libcxx), libcxx's config_site.in doesn't
get created in a timely manner. This means that any configuration
that is normally set in libcxx's config_site.in needs to be
duplicated in libcxxabi to successfully build libcxxabi. This patch
does exactly that for the _LIBCPP_HAS_THREAD_API_PTHREAD
preprocessor define.
http://reviews.llvm.org/D20574
llvm-svn: 270732
This change leverages framework changes made in libcxx. See those changes for
more details. (http://reviews.llvm.org/D16544)
Some Mac specific logic for testing against libc++abi had to be moved from
libcxxabi's config.py, as it was overriding choices made in libcxx's config.py.
That logic is now in libcxx's target_info.py.
http://reviews.llvm.org/D16545
llvm-svn: 266729
Prior to this patch, setting LIBCXXABI_LIBDIR_SUFFIX would confuse the
check-libcxxabi target. libc++abi.* would get output to lib instead of
lib${LIBCXXABI_LIBDIR_SUFFIX}, but the tests would look in the suffixed
directory.
Now, we match what libcxx does, and set the CMAKE_*_OUTPUT_DIRECTORY to the
LIBRARY_DIR.
http://reviews.llvm.org/D17410
llvm-svn: 266611
The feature check is already in place when building the library but wasn't
honored for the tests.
Differential Revision: http://reviews.llvm.org/D18205
llvm-svn: 263699
This test has a lot of classes with large amounts of manually inserted padding in them, presumably to prevent various optimizations. The test then creates lots of these objects on the stack. On embedded targets, this was usually enough to overflow the stack.
I moved the objects to global / namespace scope. Since the tests are each in their own namespace, there should be no cross-test conflicts.
llvm-svn: 262717
libcxxabi uses the C99 library's %a format specifier to turn a floating
point value into a hexadecimal string representation. The %a format
specifier is rather loosely defined in the C spec though, and some C
libraries emit a different (but valid) string for a given floating
point value. In particular, the C spec only requires that there is a
single, non-zero hexadecimal digit on the left of the decimal point.
Given that constraint, there are typically four different valid
representations of a floating point number. I have updated the test to
accept any of the valid representations for demangled floating
point literals.
llvm-svn: 258311
This patch re-commits r256322 and r256323. They were reverted due to a OS X
test failure. The test failure has been fixed by libc++ commit r258217.
This patch also adds some additional tests.
llvm-svn: 258249
This patch re-commits r256322 and r256323. They were reverted due to a OS X
test failure. The test failure has been fixed by libc++ commit r258217.
This patch also adds some additional tests.
llvm-svn: 258222
This commit adds SHF_ALLOC and SHF_EXECINSTR section flags to
`.text.__cxa_end_cleanup` section. This fixes a link error when we are
using integrated-as and `ld.gold` (with `-Wl,--gc-sections` and
`-Wl,--fatal-warnings`.)
Detailed Explanation:
1. There might be some problem with LLVM integrated-as. It is not
emitting any section flags for text sections. (This will be fixed in
an independent commit.)
2. `ld.gold` will skip the external symbols in the section without
SHF_ALLOC. This is the reason why `.text.__cxa_end_cleanup_impl`
section is discarded even though it is referenced by
`__cxa_end_cleanup()`.
This commit workaround the problem by specifying the section flags
explicitly.
Fix http://llvm.org/PR21292
llvm-svn: 256241
Summary:
libgcc_eh.a cannot be used when building libc++abi as a shared library (the default configuration). See this post for some more discussion: https://gcc.gnu.org/ml/gcc/2012-03/msg00104.html
This patch reverts back to using libgcc_s when linking libc++abi.so.
Reviewers: danalbert, chandlerc, mclow.lists, ismail, compnerd
Subscribers: vkalintiris, cfe-commits
Differential Revision: http://reviews.llvm.org/D15440
llvm-svn: 255559
Mark functions and types with the appropriate visibility. This is particularly
useful for environments which explicitly indicate origin of functions (Windows).
This aids in generating libc++abi as a DSO which exposes only the public
interfaces.
llvm-svn: 254691
Use `__builtin_offsetof` in place of `offsetof`. Certain environments provide a
macro definition of `offsetof` which may end up causing issues. This was
observed on Windows. Use `__builtin_offsetof` to ensure correct evaluation
everywhere. NFC.
llvm-svn: 253435
libstdc++ needs a few typedefs in malloc_alloc. MSVC's STL needs rebind(),
construct(), destroy(). MSVC2013 also has no snprintf, but it exists in 2015.
llvm-svn: 248129
When using SjLj EH, do not use __builtin_eh_return_regno, map directly to the
ID. This would work on some targets, particularly those where the non-SjLj EH
personality used the same register mapping (0 -> 0, 1 -> 1). However, this is
not guaranteed. Avoiding the use of the builtin enables the use of libc++ with
SjLj EH on all targets.
llvm-svn: 248108
Summary:
Currently you can't install libc++abi from within the LLVM tree without installing all of LLVM. This patch adds an install rule for libc++abi.
Reviewers: danalbert, compnerd, rengolin, beanz
Subscribers: martell, beanz, jroelofs, cfe-commits
Differential Revision: http://reviews.llvm.org/D11682
llvm-svn: 245461
Currently, the tests assume the system compiler is the one we want
to test, but if we build libcxxabi together with LLVM+Clang, it'll
get the wrong compiler.
This patch allows us to test if we have clang++ in our /bin directory,
and if so, use it.
llvm-svn: 243752
Summary:
Patch by Nitesh Jain and Jaydeep Patil with a small revision to use ABIs rather
than Architecture Revisions (which currently imply particular ABIs).
Fixes test_demangle.pass.cpp (PR24149).
Subscribers: mclow.lists, jaydeep, nitesh.jain, hans, cfe-commits
Differential Revision: http://reviews.llvm.org/D11483
llvm-svn: 243645
Summary:
backtrace_test.pass.cpp depends on unwind tables. These are generated by
-funwind-tables which is the default for x86 but not for other targets.
Thanks to Nitesh Jain for helping to narrow this down.
Fixes PR24148
Reviewers: jroelofs
Subscribers: cfe-commits, jroelofs, llvm-commits, hans
Differential Revision: http://reviews.llvm.org/D11529
llvm-svn: 243296
This silences some conversion warnings from GCC 4.9.2. Simply casting the RHS
doesn't seem to be sufficient to silence the warning. Convert the operation
equal operator usage to calculation and assignment.
llvm-svn: 238945
As a step to fix libunwind unw_step(), a new function
__gnu_unwind_frame() has been introduced to libunwind, and it is
required to use this function so that some libunwind internal data
structure can be updated properly.
llvm-svn: 238561