summaryrefslogtreecommitdiffstats
path: root/libcxx/lib
Commit message (Collapse)AuthorAgeFilesLines
* [libc++] Add missing revision number in ABI changelogLouis Dionne2019-10-031-1/+1
| | | | llvm-svn: 373625
* [libc++] Update ABI list for ABI v2Louis Dionne2019-06-171-0/+74
| | | | | | I forgot to add symbols for filesystem. llvm-svn: 363603
* [libcxx] Move CMake file to src, avoid using globsPetr Hosek2019-05-011-411/+0
| | | | | | | | | This addresses the longstanding FIXME and makes libc++ build more similar to other runtimes. Differential Revision: https://reviews.llvm.org/D61275 llvm-svn: 359656
* [libc++][CMake] Refactor how we link against system librariesLouis Dionne2019-04-301-39/+55
| | | | | | | | | | | | | | | | | Summary: Instead of populating the global LIBCXX_LIBRARIES, we use the link-time dependency management built into CMake to propagate link flags. This leads to a cleaner and easier-to-follow build. Reviewers: phosek, smeenai, EricWF Subscribers: mgorny, christof, jkorous, dexonsmith, jfb, mstorsjo, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D60969 llvm-svn: 359571
* Remove incorrect explicit instantiation declarations for valarrayRichard Smith2019-04-251-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | libc++ ABI v1 provides three valarray symbols as part of the shared library: valarray<size_t>::valarray(size_t) valarray<size_t>::~valarray() valarray<size_t>::resize(size_t, size_t) The first two of these are intended to be removed in V2 of the ABI: they're attributed _LIBCPP_HIDE_FROM_ABI_AFTER_V1, and it appears that the intention is that these symbols from the library are not used even when building using the V1 ABI. However, there are explicit instantiation declarations for all three symbols in the header, which are not correct as we do not intend to find an instantiation of these functions that is provided elsewhere. (A recent change to clang to properly diagnose explicit instantiation declarations of internal linkage functions -- required by [temp.explicit]p13 -- had to be rolled back because it diagnosed these explicit instantiations.) Remove the explicit instantiation declarations, and remove the explicit instantiation definitions for V2 of the libc++ ABI onwards. llvm-svn: 359243
* [libcxx] Update gen_link_script.py to support different input and outputPetr Hosek2019-04-221-1/+2
| | | | | | | | | | This enables the use of this script from other build systems like GN which don't support post-build actions as well as for static archives. Differential Revision: https://reviews.llvm.org/D60309 llvm-svn: 358915
* [libc++] Make sure we re-export some missing libc++abi symbols from libc++Louis Dionne2019-04-183-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Ensure we re-export __cxa_throw_bad_array_new_length and __cxa_uncaught_exceptions from libc++, since they are now provided by libc++abi. Doing this allows us to stop linking explicitly against libc++abi in the libc++abi tests, since libc++ re-exports all the necessary symbols. However, there is one caveat to that. We don't want libc++ to re-export __cxa_uncaught_exception (the singular form), since it's only provided for backwards compatibility. Hence, for the single test where we check this backwards compatibility, we explicitly link against libc++abi. PR27405 PR22654 Reviewers: EricWF Subscribers: christof, jkorous, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D60424 llvm-svn: 358690
* [CMake] Split linked libraries for shared and static libc++Petr Hosek2019-04-171-11/+13
| | | | | | | | | | | | | Some linker libraries are only needed for shared libc++, some only for static libc++, combining these together in LIBCXX_LIBRARIES and LIBCXX_INTERFACE_LIBRARIES can introduce unnecessary dependencies. This changes splits those up into LIBCXX_SHARED_LIBRARIES and LIBCXX_STATIC_LIBRARIES matching what libc++abi already does. Differential Revision: https://reviews.llvm.org/D57872 llvm-svn: 358614
* [NFC] Add missing revision number in libc++ ABI changelogLouis Dionne2019-04-151-1/+1
| | | | llvm-svn: 358411
* [CMake] Fix statically linking in libcxxabi if built separatelyMartin Storsjo2019-04-091-2/+2
| | | | | | | | | | | In this case, CMake doesn't know about the c++abi target within the same CMake run. This reverts this aspect back to how it was before SVN r357811. Differential Revision: https://reviews.llvm.org/D60448 llvm-svn: 358009
* [libc++] Remove install_name and compatibility_version on OS XLouis Dionne2019-04-081-2/+0
| | | | | | | | | | | | | | | CMake already specifies those, and we never actually want those to be used. In fact, r357811 re-ordered those flags in a way that the explicitly-provided install_name was overriding the CMake-provided install_name (instead of the other way around). This caused the dylib to be considered a system dylib, and hence the explicitly provided rpath to be ignored. This, in turn, caused some unit tests to start linking against the system libc++.dylib instead of the freshly-built one. Specifically, the unit tests that started linking against the system dylib are those that didn't specify a DYLD_LIBRARY_PATH, such as last_write_time.sh.cpp. llvm-svn: 357946
* [libc++][CMake] Make sure the benchmarks link against libc++abiLouis Dionne2019-04-051-1/+2
| | | | | | | | | | | | | | The refactoring in r357811 made it so that we didn't add the ABI library to the list of LIBCXX_LIBRARIES. As a result, benchmarks didn't link to the ABI library and were missing symbols. This broke the build bots. As a drive-by fix, we also provide the SHARED ABI library to the linker script instead of the STATIC ABI library. This couldn't be discovered on Apple platforms because libc++.dylib re-exports libc++abi.dylib symbols there. llvm-svn: 357818
* [libc++] Localize CMake code only related to the shared libraryLouis Dionne2019-04-051-68/+64
| | | | | | | | | | | | | | | | | | Summary: There's a lot of CMake logic that's only relevant to the shared library, yet it was using a code path and setting variables that impact both the shared and the static libraries. This patch moves this logic so that it clearly only impacts the shared library. Reviewers: phosek, smeenai, EricWF Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D60276 llvm-svn: 357811
* [CMake] Differentiate between static and shared libc++abiPetr Hosek2019-04-031-8/+7
| | | | | | | | | | | | | | | This addresses the issue introduced in r354212 which broke the case when static libc++abi is merged into static libc++, but shared libc++ is linked against shared libc++. There are 4 different possible combinations which is difficult to capture using a single variable. This change splits LIBCXX_CXX_ABI_LIBRARY into two: LIBCXX_CXX_SHARED_ABI_LIBRARY and LIBCXX_CXX_STATIC_ABI_LIBRARY to handle the shared and static cases. This in turn allows simplification of some of the logic around merging of static archives. Differential Revision: https://reviews.llvm.org/D60114 llvm-svn: 357556
* [libc++][CMake] Allow merging libc++abi.a into libc++ even on Apple platformsLouis Dionne2019-03-251-4/+9
| | | | | | | | | | | | | | | | | | | | Summary: I can't see a good reason to disallow this, even though it isn't the standard way we build libc++ for Apple platforms. Making this work on Apple platforms requires using different flags for --whole-archive and removing the -D flag when running `ar` to merge archives because that flag isn't supported by the `ar` shipped on Apple platforms. This shouldn't be an issue since the -D option appears to be enabled by default in GNU `ar`. Reviewers: phosek, EricWF, serge-sans-paille Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D59513 llvm-svn: 356903
* [libc++] Update the list of symbols exported from libc++abi for new/deleteLouis Dionne2019-03-221-2/+14
| | | | | | | | When libc++ does not provide new/delete, libc++abi now also provides the aligned allocation and deallocation functions, so those should be part of the re-export list for libc++. llvm-svn: 356804
* [libc++] Re-export the sjlj ABI v2 for ARM architecturesLouis Dionne2019-03-222-1/+311
| | | | | | We were previously not exporting the right ABI version of libc++abi. llvm-svn: 356798
* Allow disabling of filesystem library.Eric Fiselier2019-03-211-8/+10
| | | | | | | | | | | | | | Summary: Filesystem doesn't work on Windows, so we need a mechanism to turn it off for the time being. Reviewers: ldionne, serge-sans-paille, EricWF Reviewed By: EricWF Subscribers: mstorsjo, mgorny, christof, jdoerfert, libcxx-commits Differential Revision: https://reviews.llvm.org/D59619 llvm-svn: 356633
* [libc++][CMake] Clean up some of the libc++ re-exporting logicLouis Dionne2019-03-204-20/+2
| | | | | | | | | | | | | | | | | | | | | | Summary: This change allows specifying the version of libc++abi's ABI to re-export when configuring CMake. It also clearly identifies which ABI version of libc++abi each export file contains. Finally, it removes hardcoded knowledge about the 10.9 SDK for MacOS, since that knowledge is not relevant anymore. Indeed, libc++ can't be built with the toolchain that came with the 10.9 SDK anyway because the version of Clang it includes is too old (for example if you want to build a working libc++.dylib, you need bugfixes to visibility attributes that are only in recent Clangs). Reviewers: dexonsmith, EricWF Subscribers: mgorny, christof, jkorous, arphaman, libcxx-commits Differential Revision: https://reviews.llvm.org/D59489 llvm-svn: 356587
* [libc++] Complete the ABI changelog after landing <filesystem> in the dylibLouis Dionne2019-03-191-2/+72
| | | | llvm-svn: 356523
* [libc++] Build <filesystem> support as part of the dylibLouis Dionne2019-03-193-42/+206
| | | | | | | | | | | | | | | | | | | Summary: This patch treats <filesystem> as a first-class citizen of the dylib, like all other sub-libraries (e.g. <chrono>). As such, it also removes all special handling for installing the filesystem library separately or disabling part of the test suite from the lit command line. Unlike the previous attempt (r356500), this doesn't remove all the filesystem tests. Reviewers: mclow.lists, EricWF, serge-sans-paille Subscribers: mgorny, christof, jkorous, dexonsmith, jfb, jdoerfert, libcxx-commits Differential Revision: https://reviews.llvm.org/D59152 llvm-svn: 356518
* Revert "[libc++] Build <filesystem> support as part of the dylib"Louis Dionne2019-03-193-206/+42
| | | | | | | | When I applied r356500 (https://reviews.llvm.org/D59152), I somehow deleted all of filesystem's tests. I will revert r356500 and re-apply it properly. llvm-svn: 356505
* Fixup ABI lists on Linux after adding <filesystem> to the dylib.Eric Fiselier2019-03-191-0/+71
| | | | llvm-svn: 356503
* [libc++] Build <filesystem> support as part of the dylibLouis Dionne2019-03-193-42/+206
| | | | | | | | | | | | | | | | Summary: This patch treats <filesystem> as a first-class citizen of the dylib, like all other sub-libraries (e.g. <chrono>). As such, it also removes all special handling for installing the filesystem library separately or disabling part of the test suite from the lit command line. Reviewers: mclow.lists, EricWF, serge-sans-paille Subscribers: mgorny, christof, jkorous, dexonsmith, jfb, jdoerfert, libcxx-commits Differential Revision: https://reviews.llvm.org/D59152 llvm-svn: 356500
* Remove exception throwing debug mode handler support.Eric Fiselier2019-03-184-41/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The reason libc++ implemented a throwing debug mode handler was for ease of testing. Specifically, I thought that if a debug violation aborted, we could only test one violation per file. This made it impossible to test debug mode. Which throwing behavior we could test more! However, the throwing approach didn't work either, since there are debug violations underneath noexcept functions. This lead to the introduction of `_NOEXCEPT_DEBUG`, which was only noexcept when debug mode was off. Having thought more and having grown wiser, `_NOEXCEPT_DEBUG` was a horrible decision. It was viral, it didn't cover all the cases it needed to, and it was observable to the user -- at worst changing the behavior of their program. This patch removes the throwing debug handler, and rewrites the debug tests using 'fork-ing' style death tests. Reviewers: mclow.lists, ldionne, thomasanderson Reviewed By: ldionne Subscribers: christof, arphaman, libcxx-commits, #libc Differential Revision: https://reviews.llvm.org/D59166 llvm-svn: 356417
* [libc++][CMake] Do not define `cxx_shared_EXPORTS` when building the shared ↵Louis Dionne2019-03-141-0/+1
| | | | | | | | | | | | library CMake will define -Dcxx_shared_EXPORTS when building the shared library by default. In theory, this is used to signal to the library that we're building a shared library and that dllimport/dllexport should be used. However, we already have our own way of doing that, so I'm removing this define to avoid meaningless command line arguments in the build. llvm-svn: 356167
* [libc++][CMake] Fix typo introduced in r356150Louis Dionne2019-03-141-1/+1
| | | | | | That typo broke the build when the shared library build was disabled. llvm-svn: 356155
* [libc++] Do not force building with -fPIC (re-applying)Louis Dionne2019-03-141-4/+0
| | | | | | | | | | | | | | | | | | | | | | | Summary: In r355746, we stopped forcing to build with -fPIC because that should be specified by the CMAKE_POSITION_INDEPENDENT_CODE option at CMake configure time (and by default -fPIC is used for shared libraries anyways). However, r355746 had to be reverted in r355756 because we were not actually building the shared library with -fPIC. The reason is that we were sharing an object library between the static and the shared library, which caused flags for static libraries to be used when building object files that were going to be used for a shared library. Since this was resolved by r356150, we can stop forcing -fPIC again. Reviewers: EricWF, smeenai Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D59250 llvm-svn: 356153
* [libc++] Do not share an object library to create the static/shared librariesLouis Dionne2019-03-141-38/+19
| | | | | | | | | | | | | | | | | | | | | | Summary: The problem with using an object library for doing this is that it prevents the shared library and the static library from being built with the right default flags. For example, CMake will build shared libraries with -fPIC by default, but not static libraries. Using an object library to create the shared library will prevent the right default flags for shared libraries from being used. As a side effect, this patch also localizes the logic related to building a hermetic static library to the static library case, making clear that this has no effect on the shared library. Reviewers: phosek, EricWF Subscribers: mgorny, christof, jkorous, dexonsmith, jdoerfert, libcxx-commits Differential Revision: https://reviews.llvm.org/D59248 llvm-svn: 356150
* Revert "[libc++] Do not force building with -fPIC"Eric Fiselier2019-03-081-0/+4
| | | | | | | | | | This reverts commit r355764. CMake does not turn -fPIC on for us by default. so this patch breaks standalone builds. The only reason it hasn't broken any bots is because LLVM turns on and specifies '-fPIC' for us. llvm-svn: 355756
* [libc++] Do not force building with -fPICLouis Dionne2019-03-081-4/+0
| | | | | | | | | | | | | | | | Summary: Whether we build with -fPIC should be specified by the CMAKE_POSITION_INDEPENDENT_CODE option at configure time. Note that this patch doesn't change the behavior when building by default, since -fPIC is used for shared libraries by default. Reviewers: EricWF Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D59146 llvm-svn: 355746
* [NFC] Add missing revision information to ABI ChangelogLouis Dionne2019-03-081-1/+1
| | | | llvm-svn: 355732
* Revert "[runtimes] Move libunwind, libc++abi and libc++ to lib/ and include/"Matthew Voss2019-03-081-3/+3
| | | | | | | | This broke the windows bots. This reverts commit 28302c66d2586074f77497d5dc4eac7182b679e0. llvm-svn: 355725
* [runtimes] Move libunwind, libc++abi and libc++ to lib/ and include/Petr Hosek2019-03-081-3/+3
| | | | | | | | | | | | | | | This change is a consequence of the discussion in "RFC: Place libs in Clang-dedicated directories", specifically the suggestion that libunwind, libc++abi and libc++ shouldn't be using Clang resource directory. Tools like clangd make this assumption, but this is currently not true for the LLVM_ENABLE_PER_TARGET_RUNTIME_DIR build. This change addresses that by moving the output of these libraries to lib/<target> and include/ directories, leaving resource directory only for compiler-rt runtimes and Clang builtin headers. Differential Revision: https://reviews.llvm.org/D59013 llvm-svn: 355665
* Fix -fsanitize=vptr badness in <__debug>Eric Fiselier2019-03-054-3/+29
| | | | | | | | | | | | | | | | | | | | | | | Summary: This patch fixes a lifetime bug when inserting a new container into the debug database. It is diagnosed by UBSAN when debug mode is enabled. This patch corrects how nodes are constructed during insertion. The fix requires unconditionally breaking the debug mode ABI. Users should not expect ABI stability from debug mode. Reviewers: ldionne, serge-sans-paille, EricWF Reviewed By: EricWF Subscribers: mclow.lists, christof, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D58011 llvm-svn: 355367
* [libc++] Remove old CMake workaroundLouis Dionne2019-03-041-20/+14
| | | | | | | We haven't had any complaints so far, and I don't think anybody builds libc++ from source for that old platform anymore. llvm-svn: 355336
* Make LIBCXX_STANDARD_VER configurableEric Fiselier2019-02-101-1/+1
| | | | llvm-svn: 353649
* Format sym_extract.py output to minimize diff output.Eric Fiselier2019-02-103-6542/+6542
| | | | | | | | Different versions of python print dictionaries in different orders. This can mess up diffs when updating ABI lists. This patch uses pprint.pformat to print the dicts to get a consistent ordering. llvm-svn: 353634
* Add missing symbols to Apple v2 abi list.Eric Fiselier2019-02-101-0/+6
| | | | | | | | The itoa symbols were added and their addition is documented in the CHANGELOG. I'm not sure why the valarray symbols were missing previously, but they're present in the v1 ABI lists and should be here as well. llvm-svn: 353633
* Add ABI list directories for 8.0Eric Fiselier2019-02-103-0/+6536
| | | | llvm-svn: 353632
* [CMake] Use correct visibility for linked libraries in CMakePetr Hosek2019-01-301-2/+7
| | | | | | | | | | | When linking library dependencies, we shouldn't need to export linked libraries to dependents. We should be explicit about this in target_link_libraries, otherwise other targets that depend on these such as sanitizers get repeated (and possibly even conflicting) dependencies. Differential Revision: https://reviews.llvm.org/D57456 llvm-svn: 352688
* Revert "[CMake] Use correct visibility for linked libraries in CMake"Petr Hosek2019-01-301-2/+2
| | | | | | This reverts commit r352654: this broke libcxx and sanitizer bots. llvm-svn: 352658
* [CMake] Use correct visibility for linked libraries in CMakePetr Hosek2019-01-301-2/+2
| | | | | | | | | | | When linking library dependencies, we shouldn't need to export linked libraries to dependents. We should be explicit about this in target_link_libraries, otherwise other targets that depend on these such as sanitizers get repeated (and possibly even conflicting) dependencies. Differential Revision: https://reviews.llvm.org/D57456 llvm-svn: 352654
* [NFC] Add missing revision for removal of bad_array_length in ABI changelogLouis Dionne2019-01-291-1/+1
| | | | llvm-svn: 352513
* [libcxx] Support building hermetic static libraryPetr Hosek2019-01-061-33/+60
| | | | | | | | | | | | This is useful when static libc++ library is being linked into shared libraries that may be used in combination with libraries. We want to avoid we exporting libc++ symbols in those cases where this option is useful. This is provided as a CMake option and can be enabled by libc++ vendors as needed. Differential Revision: https://reviews.llvm.org/D55404 llvm-svn: 350489
* [libcxx] Remove bad_array_lengthLouis Dionne2018-11-294-46/+29
| | | | | | | | | | | | | | | | Summary: std::bad_array_length was added by n3467, but this never made it into C++. This commit removes the definition of std::bad_array_length from the headers AND from the shared library. See the comments in the ABI changelog for details about the ABI implications of this change. Reviewers: mclow.lists, dexonsmith, howard.hinnant, EricWF Subscribers: christof, jkorous, libcxx-commits Differential Revision: https://reviews.llvm.org/D54804 llvm-svn: 347903
* [libcxx] Make sure the re-export logic works when paths contain spacesLouis Dionne2018-11-271-5/+5
| | | | llvm-svn: 347711
* [libcxx] Fix libc++ re-exporting logic when Command Line Tools are not installedLouis Dionne2018-11-271-18/+11
| | | | | | | | | | | | | | | | | | Summary: When the Xcode Command Line tools are not installed but CMAKE_OSX_SYSROOT is set, we would try to re-export symbols from the libc++abi.dylib shipped in the sysroot, which does not exist. This commit changes the build on OS X to always re-export symbols from the explicit re-export lists, which doesn't change depending on what system you're building on, and is therefore much less flaky. Reviewers: EricWF, mclow.lists Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D54595 llvm-svn: 347708
* [NFC][libcxx] Add revision number to ABI changelogLouis Dionne2018-11-211-1/+1
| | | | llvm-svn: 347396
* [libcxx] Make sure we can build with -fvisibility=hidden on LinuxLouis Dionne2018-11-212-23/+38
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This commit marks a few functions as hidden and removes them from the ABI list on Linux such that libc++ can be built with -fvisibility=hidden. The functions marked as hidden by this patch were exported from the shared object only because they were implicitly instantiated function templates. It is safe to stop exporting those symbols from the shared object because nobody could actually depend on them: implicit instantiations are not taken from shared objects. The symbols removed in this commit are basically the same that had been removed in https://reviews.llvm.org/D53868, but that patch had to be reverted because it broke the build (because the functions were not marked as hidden like this patch does). Reviewers: EricWF, mclow.lists Subscribers: christof, jkorous, dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D54639 llvm-svn: 347395
OpenPOWER on IntegriCloud