Commit Graph

266 Commits

Author SHA1 Message Date
Eric Fiselier
381fd9ec33 Revert "Build with -fvisibility=hidden"
I messed it up somewhere and now the tests aren't linking.
Reverting while I investigate.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345667 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-30 22:23:01 +00:00
Eric Fiselier
74b3eac97a Build with -fvisibility=hidden
Summary:
This change changes the build to use -fvisibility=hidden

The exports this patch removes are symbols that should have never been exported
by the dylib in the first place, and should all be symbols which the linker
won't de-duplicate across SO boundaries, making them safe to remove.

After this change, we should be able to apply `_LIBCPP_HIDDEN` to the versioning namespace without changing the export lists.

Reviewers: ldionne, mclow.lists

Reviewed By: ldionne

Subscribers: smeenai, mgorny, libcxx-commits

Differential Revision: https://reviews.llvm.org/D53868

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345664 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-30 22:07:52 +00:00
Louis Dionne
73f498b7e0 [NFC] Update comment in libc++ ABI changelog
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345424 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-26 20:08:43 +00:00
Louis Dionne
07f95bd10d [libc++] Make sure we can build libc++ with -fvisibility=hidden
Summary:
When building with -fvisibility=hidden, some symbols do not get exported from
libc++.dylib. This means that some entities are not explicitly given default
visibility in the source code, and that we rely on the fact -fvisibility=default
is the default. This commit explicitly gives default visibility to those
symbols to avoid being dependent on the command line flags used.

The commit also remove symbols from the dylib -- those symbols do not
actually need to be exported from the dylib and this should not be an
ABI break.

Finally, in the future, we may want to mark the whole std:: namespace as
having hidden visibility (to switch from opt-out to opt-in), in which
case the changes done in this commit will be required.

Reviewers: EricWF

Subscribers: mgorny, christof, dexonsmith, libcxx-commits

Differential Revision: https://reviews.llvm.org/D52662

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345260 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-25 12:13:43 +00:00
Louis Dionne
9bc5d8e1ba [libcxx] Remove custom CMake code targeting Mac OS 10.6
libc++ has dropped support for Mac OS 10.6 for a while, and we don't
have any testers set up for that OS.

This commit puts in an error message so that people can reach out to
the libc++ maintainers in case support for 10.6 is still expected (as
opposed to silently failing in weird ways). We can completely drop
support for 10.6 and remove the error message some time in the future
when we're sure that nobody is relying on it.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344576 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-16 00:31:32 +00:00
Louis Dionne
e992efe2da [libcxx] Document new symbols __u64toa and __u32toa on Darwin
Summary:
This is the counterpart for https://reviews.llvm.org/D50130 and
https://reviews.llvm.org/D52391 on Darwin.

Reviewers: EricWF

Subscribers: christof, dexonsmith, cfe-commits, libcxx-commits, lichray

Differential Revision: https://reviews.llvm.org/D52396

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342849 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-23 21:10:06 +00:00
Louis Dionne
7c3b27d2c9 [libcxx] Fix the definition of the check-cxx-abilist target on Darwin
Summary:
r342805 added support for the check-cxx-abilist target on FreeBSD, but broke
the target on macOS in doing so. The problem is that the GENERIC_TARGET_TRIPLE
gets overwritten after replacing the FreeBSD regular expression, which
nullifies the replacement done with the darwin regular expression.

Reviewers: dim, EricWF

Subscribers: emaste, mgorny, krytarowski, christof, dexonsmith, cfe-commits, libcxx-commits

Differential Revision: https://reviews.llvm.org/D52394

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342813 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-22 18:39:38 +00:00
Zhihao Yuan
5ba89193c4 Document new symbols for __u64toa and __u32toa
Summary:
They are introduced in r338479; their Linux ABI changes are recorded in r338486.

TODO: Record the Mac OS X ABI changes.

Reviewers: EricWF

Reviewed By: EricWF

Subscribers: christof, ldionne, libcxx-commits, cfe-commits

Differential Revision: https://reviews.llvm.org/D52391

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342810 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-22 18:05:28 +00:00
Dimitry Andric
699bfec76c Similar to the handling of darwin target triples, strip the version
numbers off of freebsd target triples, when generating the name of the
ABI list file for check-cxx-abilist target.

Also remove unnecessary parentheses in the regex for darwin, and
slightly reword the comment.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342805 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-22 14:37:49 +00:00
Louis Dionne
5ae92f0055 [libc++] Add the _LIBCPP_HIDE_FROM_ABI_AFTER_V1 macro
Summary:
This macro allows hiding symbols from the ABI when the library is built
with an ABI version after ABI v1, which is currently the only stable ABI.
This commit defines `_LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY` to be
`_LIBCPP_HIDE_FROM_ABI_AFTER_V1`, meaning that symbols that were only
exported by the library for historical reasons are not exported anymore
in the unstable ABI.

Because of that, this commit is an ABI break for ABI v2. This ABI version
is not stable, however, so this should not be a problem.

Reviewers: EricWF, mclow.lists

Subscribers: christof, dexonsmith, cfe-commits

Differential Revision: https://reviews.llvm.org/D49914

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@339012 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-06 14:11:50 +00:00
Zhihao Yuan
80f0ca024a [libc++] Fix build failures after merging <charconv>
Summary:
- fix a stupid unit test typo
- add <charconv> symbols to Linux abilist

Reviewers: EricWF

Subscribers: christof, ldionne, cfe-commits

Differential Revision: https://reviews.llvm.org/D50130

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338486 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-01 05:21:26 +00:00
Eric Fiselier
bc3f4035c3 Add libc++fs to the test deps, and not to the target 'cxx'.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338096 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-27 03:47:46 +00:00
Eric Fiselier
0be5527dc0 Attempt to unbreak *all the bots*
The bots were failing to build the cxx_filesystem target, so the
tests were failing. Though this does lead me to wonder how it
was ever working with c++experimental.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338095 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-27 03:42:58 +00:00
Eric Fiselier
a0866c5fb5 Implement <filesystem>
This patch implements the <filesystem> header and uses that
to provide <experimental/filesystem>.

Unlike other standard headers, the symbols needed for <filesystem>
have not yet been placed in libc++.so. Instead they live in the
new libc++fs.a library. Users of filesystem are required to link this
library. (Also note that libc++experimental no longer contains the
definition of <experimental/filesystem>, which now requires linking libc++fs).

The reason for keeping <filesystem> out of the dylib for now is that
it's still somewhat experimental, and the possibility of requiring an
ABI breaking change is very real. In the future the symbols will likely
be moved into the dylib, or the dylib will be made to link libc++fs automagically).

Note that moving the symbols out of libc++experimental may break user builds
until they update to -lc++fs. This should be OK, because the experimental
library provides no stability guarantees. However, I plan on looking into
ways we can force libc++experimental to automagically link libc++fs.

In order to use a single implementation and set of tests for <filesystem>, it
has been placed in a special `__fs` namespace. This namespace is inline in
C++17 onward, but not before that. As such implementation is available
in C++11 onward, but no filesystem namespace is present "directly", and
as such name conflicts shouldn't occur in C++11 or C++14.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338093 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-27 03:07:09 +00:00
Petr Hosek
89d973a050 [CMake] Option to control whether shared/static library is installed
Currently it's only possible to control whether shared or static library
build of libc++, libc++abi and libunwind is enabled or disabled and
whether to install everything we've built or not. However, it'd be
useful to have more fine grained control, e.g. when static libraries are
merged together into libc++.a we don't need to install libc++abi.a and
libunwind.a. This change adds this option.

Differential Revision: https://reviews.llvm.org/D49573

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337867 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-24 23:27:51 +00:00
Petr Hosek
44ef94a8c9 Reland "[CMake] Support statically linking dependencies only to shared or static library"
This is a reland of commit r337668.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337814 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-24 07:06:17 +00:00
Petr Hosek
78c3548b88 Revert "[CMake] Support statically linking dependencies only to shared or static library"
This reverts commit r337668: broke the cxxabi build when using Make.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337670 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-23 05:07:44 +00:00
Petr Hosek
24acfd881a [CMake] Support statically linking dependencies only to shared or static library
Currently it's possible to select whether to statically link unwinder
or the C++ ABI library, but this option applies to both the shared
and static library. However, in some scenarios it may be desirable to
only statically link unwinder and C++ ABI library into static C++
library since for shared C++ library we can rely on dynamic linking
and linker scripts. This change enables selectively enabling or
disabling statically linking only to shared or static library.

Differential Revision: https://reviews.llvm.org/D49502

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337668 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-23 04:19:55 +00:00
Louis Dionne
c69e1a0615 [libc++] Allow running ABI list tests with different ABI versions
Summary:
Currently, the ABI list test only works for ABI version 1. This commit
allows running the ABI list test with ABI version 2. It also adds an
ABI list file for ABI v2 on Mac OS X.

Reviewers: EricWF

Subscribers: mgorny, christof, dexonsmith, llvm-commits, mclow.lists

Differential Revision: https://reviews.llvm.org/D49509

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337477 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-19 18:02:50 +00:00
Ahmed Bougacha
92f1507ade [CMake] Rename cxx_headers back to cxx-headers.
r334477 renamed the cxx-headers target to cxx_headers, but various
pieces sort-of expect the target names to match the component (e.g.,
LLVM_DISTRIBUTION_COMPONENTS in the various bootstrap caches, which, via
some magic foreign to me, seems to expect cxx-headers,
install-cxx-headers, and install-cxx-headers-stripped to exist.)

Revert back to cxx-headers.

Differential Revision: https://reviews.llvm.org/D48701

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@335899 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-28 18:35:35 +00:00
Petr Hosek
204d5ec7f1 [CMake] Use common variable for all header targets NFC
This simplifies the handling of header targets.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@334477 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-12 06:58:06 +00:00
Petr Hosek
8650687840 [CMake] Add a missing target dependency on C++ ABI headers
This resolves the breakage introduced in r334468 which results in
build error when using CMake Makefile generator.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@334470 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-12 03:31:03 +00:00
Petr Hosek
f48515b28b Reland "Use custom command and target to install libc++ headers"
Using file(COPY FILE...) has several downsides. Since the file command
is only executed at configuration time, any changes to headers made
after the initial CMake execution are ignored. This can lead to subtle
errors since the just built Clang will be using stale libc++ headers.
Furthermore, since the headers are copied prior to executing the build
system, this may hide missing dependencies on libc++ from other LLVM
components.

This changes replaces the use of file(COPY FILE...) command with a
custom command and target which addresses all aforementioned issues and
matches the implementation already used by other LLVM components that
also install headers like Clang builtin headers.

Differential Revision: https://reviews.llvm.org/D44773

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@334468 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-12 03:10:02 +00:00
Eric Fiselier
6d9d212ebb Update ABI lists after change in r333467.
r333467 updated the symbols exported by libc++.so/dylib by changing
the ODR usage of __uncaught_exception/__uncaught_exceptions. This
should not be a breaking change.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@333481 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-29 23:52:14 +00:00
Petr Hosek
09ff3dc74f Revert "[CMake] Use custom command and target to install libc++ headers"
This reverts commit r329544 which is failing on libcxx standalone bots.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@329545 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-09 04:36:04 +00:00
Petr Hosek
8d0d6fa4aa [CMake] Use custom command and target to install libc++ headers
Using file(COPY FILE...) has several downsides. Since the file command
is only executed at configuration time, any changes to headers made
after the initial CMake execution are ignored. This can lead to subtle
errors since the just built Clang will be using stale libc++ headers.
Furthermore, since the headers are copied prior to executing the build
system, this may hide missing dependencies on libc++ from other LLVM
components.

This changes replaces the use of file(COPY FILE...) command with a
custom command and target which addresses all aforementioned issues and
matches the implementation already used by other LLVM components that
also install headers like Clang builtin headers.

Differential Revision: https://reviews.llvm.org/D44773

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@329544 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-09 04:23:04 +00:00
Petr Hosek
698b695147 [CMake] Copy the generated __config header into build directory
When the generated __config file is being used, it is currently only
copied during installation process. However, that means that the file
that gets copied into LLVM build directory is the vanilla __config file,
and any parts of the build that depend on the just built toolchain like
sanitizers will get that instead of the generated version. To avoid this
issue, we need to copy the generated header into the LLVM build
directory as well.

Differential Revision: https://reviews.llvm.org/D43797

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@327194 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-10 01:20:11 +00:00
Don Hinton
1dfee5b4d4 LLVM_FOUND isn't always set, so just test if llvm_setup_rpath() is
available instead.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@323599 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-27 18:55:30 +00:00
Don Hinton
44aacb7850 Reland: [cmake] [libcxx] Call llvm_setup_rpath() when adding shared libraries.
Clang and llvm already use llvm_setup_rpath(), so this change will
help standarize rpath usage across all projects.

Differential Revision: https://reviews.llvm.org/D42459

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@323492 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-26 01:34:51 +00:00
Don Hinton
e0c8dbec38 Revert [libcxx] r323453 - [cmake] [libcxx] Call llvm_setup_rpath() when adding shared libraries.
Shoaib Meenai pointed out this will break standalone builds when built without llvm.

Differential Revision: https://reviews.llvm.org/D42459

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@323459 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-25 19:22:23 +00:00
Don Hinton
102b0a11f0 [cmake] [libcxx] Call llvm_setup_rpath() when adding shared libraries.
Clang and llvm already use llvm_setup_rpath(), so this change will
help standarize rpath usage across all projects.

Differential Revision: https://reviews.llvm.org/D42459

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@323453 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-25 18:13:26 +00:00
Shoaib Meenai
cd9466e36f [libc++] Create install-stripped targets
LLVM is gaining install-*-stripped targets to perform stripped installs,
and in order for this to be useful for install-distribution, all
potential distribution components should have stripped installation
targets. LLVM has a function to create these install targets, but since
we can't use LLVM CMake functions in libc++, let's do it manually.

Differential Revision: https://reviews.llvm.org/D40680

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@319959 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-06 21:03:42 +00:00
Eric Fiselier
edf6f11feb Update changelog revision
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@313501 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-17 21:00:27 +00:00
Eric Fiselier
0732dcfd0d ABI: Fix for undefined "___cxa_deleted_virtual" symbol in MacOSX
Patch from Eddie Elizondo. Reviewed as D37830 (https://reviews.llvm.org/D37830).

On MacOSX the following program:

struct S { virtual void f() = delete; };
int main() { new S; }
Fails with the following error:

Undefined symbols for architecture x86_64:
  "___cxa_deleted_virtual"
This adds a fix to export the needed symbols.

Test:

> lit -sv test/libcxx/language.support/cxa_deleted_virtual.pass.cpp
> Testing Time: 0.21s
>   Expected Passes    : 1



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@313500 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-17 20:59:43 +00:00
Martin Storsjo
5f919fe349 Use CMAKE_AR instead of the system default 'ar' for merging static libraries
Using the system default 'ar' might not be the right choice when
cross compiling.

Don't prepend the ar options by a dash, not all ar implementations
support that (llvm-ar doesn't).

Also pass the 's' option when creating the merged library, to create
an index.

Differential Revision: https://reviews.llvm.org/D37134

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@313122 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-13 06:55:44 +00:00
Martin Storsjo
ed487a3dc3 Add MINGW_LIBRARIES to the linker flags
This is essential when building with -nodefaultlibs.

This is similar to what already is done in libcxxabi in SVN r302760.

Differential revision: https://reviews.llvm.org/D37207

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@312498 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-04 19:46:53 +00:00
Leo Li
158fe1062c [CMake] Use MATCHES for regular expression.
Subscribers: mgorny

Differential Revision: https://reviews.llvm.org/D35514

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@308347 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-18 19:48:02 +00:00
Petr Hosek
347be61138 [libcxx][CMake] Add install path variable to allow overriding the destination
This is going to be used by the runtime build in the multi-target
setup to allow using different install prefix for each target.

Differential Revision: https://reviews.llvm.org/D33762

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@307615 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-11 02:39:50 +00:00
Eric Fiselier
957d7f4ec7 Move external instantiation for __vector_base_common to vector.cpp
Previously the explicit instantiation for this was in locale.cpp,
but that didn't make much sense. This patch creates a new vector.cpp
source file to contain the explicit instantiation.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@305442 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-15 01:53:12 +00:00
Martell Malone
fa3bd28afb libcxx: fix bootstrapping for mingw-w64
Differential Revision: https://reviews.llvm.org/D33388

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@303928 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25 22:37:15 +00:00
Eric Fiselier
78f5dc09ca [libc++] Implement exception_ptr on Windows
Summary:
This patch implements exception_ptr on Windows using the `__ExceptionPtrFoo` functions provided by MSVC.

The `__ExceptionPtrFoo` functions are defined inside the C++ standard library, `msvcprt`, which is unfortunate because it requires libc++ to link to the MSVC STL. However this doesn't seem to cause any immediate problems. However to be safe I kept all usages within the libc++ dylib so that user programs wouldn't have to link to MSVCPRT as well.

Note there are still 2 outstanding exception_ptr/nested_exception test failures.

* `current_exception.pass.cpp` needs to be rewritten for the Windows exception_ptr semantics which copy the exception every time.
* `rethrow_if_nested.pass.cpp` need investigation. It hits a stack overflow, likely from recursion.

This patch also gets most of the `<future>` tests passing as well.

Reviewers: mclow.lists, compnerd, bcraig, rmaprath, majnemer, BillyONeal, STL_MSFT

Subscribers: mgorny, cfe-commits

Differential Revision: https://reviews.llvm.org/D32927

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302393 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-08 01:17:50 +00:00
Eric Fiselier
23ccaa54dc Rename the static version of libc++ on Windows.
Previously both the static version of libc++ and the
import library for the DLL had the same name, 'c++.lib'.

This patch renames the static library on Windows to be `libc++.lib`
so it no longer conflicts. This naming convention is consistent with
other windows libraries.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300817 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-20 04:19:02 +00:00
Eric Fiselier
9ea4041df8 [libcxx] Fix check-cxx-abilist on OS X
Summary:
Recent commits broke the check-cxx-abilist by changing the default OS X to use `-rexport_library` instead of `-reexport_symbol_list`. Apparently `-reexport_library` doesn't export the symbols into `libc++.dylib`s symbol table, whereas `-reexport_symbol_list` does.

This means the change removed ~500 symbols from the symbol table. I've been told this change is non ABI breaking, but it does make it harder to maintain the ABI lists, and hence the ABI.

This patch fixes the issue by switching back to `-reexport_symbol_list`. It still avoid the issues fixed in r299052 by putting the new/delete symbols in a different symbol list file, which is only exported when LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS in OFF.


Reviewers: mehdi_amini, smeenai, dexonsmith

Reviewed By: smeenai

Subscribers: mgorny, cfe-commits

Differential Revision: https://reviews.llvm.org/D31644

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300390 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-15 05:41:45 +00:00
Petr Hosek
1662a857db [CMake][libcxx] Use builtins rather than gcc_s when compiler-rt is requested
When compiler-rt is requested, we should attempt to link compiler-rt
builtins library rather than gcc_s.

Differential Revision: https://reviews.llvm.org/D31617

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@299599 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-05 22:53:05 +00:00
Mehdi Amini
3f140f0041 Reexport operator new / delete from libc++abi
Both libc++ and libc++abi export a weak definition of operator
new/delete. On Darwin, this can often cause dirty __DATA in the
shared cache when having to switch from one to the other. Instead,
libc++ should reexport libc++abi's implementation of these symbols.

Patch by: Ted Kremenek <kremenek@apple.com>

Differential Revision: https://reviews.llvm.org/D30765

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@299054 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-30 04:47:19 +00:00
Mehdi Amini
0a74c73d3f Do not pass an explicit reexported symbol list when building libc++ dylib if also defining new/delete
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@299052 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-30 04:40:56 +00:00
Shoaib Meenai
f012f260c3 [libc++] Add a key function for bad_function_call
Summary:
bad_function_call is currently an empty class, so any object files using
that class will end up with their own copy of its typeinfo, typeinfo
name and vtable, leading to unnecessary duplication that has to be
resolved by the dynamic linker. Instead, give bad_function_call a key
function and put a definition for that key function in libc++ itself, to
centralize the typeinfo and vtable.

This is consistent with the behavior for other exception classes. The
key functions are defined in libc++ rather than libc++abi since the
class is defined in the libc++ versioning namespace, so ABI
compatibility with libstdc++ is not a concern.

Guard this change behind an ABI macro, since it isn't backwards
compatible (i.e., clients built against the new libc++ headers wouldn't
be able to run against an older libc++ library).

Reviewers: mclow.lists, EricWF

Subscribers: mgorny, cfe-commits

Differential Revision: https://reviews.llvm.org/D27387

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298937 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-28 19:33:31 +00:00
Eric Fiselier
c51e0d21a1 Change test coverage generation to use llvm-cov instead of gcov.
Clang doesn't produce gcov compatible coverage files. This
causes lcov to break because it uses gcov by default. This
patch switches lcov to use llvm-cov as the gcov-tool.

Unfortunatly llvm-cov doesn't provide a gcov like interface by
default so it won't work with lcov. However `llvm-cov gcov` does.
For this reason we generate 'llvm-cov-wrapper' script that always
passes the gcov flag.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@297553 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 03:24:18 +00:00
Eric Fiselier
a075831614 Remove the buildit and testit scripts; they haven't been supported in years
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@296922 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-03 22:47:45 +00:00
Eric Fiselier
c6748b28c4 Update ABI list for 4.0 release
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@296805 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-02 19:59:53 +00:00