summaryrefslogtreecommitdiffstats
path: root/libcxx/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Update ABI list for 4.0 releaseEric Fiselier2017-03-022-1905/+1906
| | | | llvm-svn: 296805
* [libc++] Make _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS export membersShoaib Meenai2017-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building libc++ with hidden visibility, we want explicit template instantiations to export members. This is consistent with existing Windows behavior, and is necessary for clients to be able to link against a hidden visibility built libc++ without running into lots of missing symbols. An unfortunate side effect, however, is that any template methods of a class with an explicit instantiation will get default visibility when instantiated, unless the methods are explicitly marked inline or hidden visibility. This is not desirable for clients of libc++ headers who wish to control their visibility, and led to PR30642. Annotate all problematic methods with an explicit visibility specifier to avoid this. The problematic methods were found by running https://github.com/smeenai/bad-visibility-finder against the libc++ headers after making the _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS change. The methods were marked with the new _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS macro, which was created for this purpose. It should be noted that _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS was originally intended to expand to default visibility, and was changed to expanding to default type visibility to fix PR30642. The visibility macro documentation was not updated accordingly, however, so this change makes the macro consistent with its documentation again, while explicitly fixing the methods which resulted in that PR. Differential Revision: https://reviews.llvm.org/D29157 llvm-svn: 296731
* [libc++] Mark some std::num_get method templates inlineShoaib Meenai2017-03-022-19/+37
| | | | | | | | | | | | | | | | | D29157 will make explicit template instantiations expand to default visibility, at which point these method templates will need to be explicitly marked hidden visibility to avoid leaking into other DSOs. Unfortunately, because of clang PR32114, they must be marked inline (in conjunction with `-fvisibility-inlines-hidden`) to actually hide them, since clang doesn't respect the hidden visibility annotation. Since this involves an ABI change, mark these methods inline in a separate change, so that the ABI changes can be reviewed separately and verified to be safe. Differential Revision: https://reviews.llvm.org/D30523 llvm-svn: 296729
* update revision in CHANGELOG.TXT and fix python errorEric Fiselier2017-02-171-2/+2
| | | | llvm-svn: 295399
* Remove more basic_string member function templates from the dylib exportsEric Fiselier2017-02-172-1905/+1916
| | | | llvm-svn: 295398
* Start libc++ python cleanup and consolidation.Eric Fiselier2017-02-092-2/+2
| | | | | | | | | Libc++ frequently creates and uses utilities written in python. Currently there are python modules under both libcxx/test and libcxx/util. My goal with these changes is to consolidate them into a single package under libcxx/utils/libcxx. llvm-svn: 294644
* [libcxx][CMake] Support in-tree libunwind when building as part of runtimesPetr Hosek2017-02-091-2/+2
| | | | | | | | | | | When building as part of runtimes, there is no predefined order in which the runtimes are loaded, so the targets from other projects might not be available. We need to rely on HAVE_<name> variables instead in that case. Differential Revision: https://reviews.llvm.org/D29575 llvm-svn: 294553
* Adjust Apple ABI list after r294133Eric Fiselier2017-02-051-0/+1
| | | | llvm-svn: 294139
* Adjust Linux ABI list after r294133Eric Fiselier2017-02-051-1904/+1905
| | | | llvm-svn: 294138
* Update Linux ABI lists to reflect inlining change in LLVM. More ↵Eric Fiselier2017-01-241-1905/+1904
| | | | | | investigation tomorrow. llvm-svn: 292929
* Fix handling of Apple target triple when checking the ABI lists.Eric Fiselier2017-01-204-3/+10
| | | | | | | | | | | | The check-cxx-abilist rule uses TARGET_TRIPLE to determine which ABI list to check. However the triple on Apple contains the darwin version which changes frequently, but libc++ doesn't need different ABI lists for each darwin version. This patch strips the minor version and patchlevel from TARGET_TRIPLE before using it to determine the ABI list. llvm-svn: 292557
* Allow sym_diff.py to report non-zero for non-breaking ABI changesEric Fiselier2017-01-181-1/+2
| | | | llvm-svn: 292297
* Add warning messages to buildit/testit about their upcoming removalEric Fiselier2017-01-171-0/+10
| | | | llvm-svn: 292181
* Reland "[CMake][libcxx] Do not rely on the existence of c++abi or unwind ↵Petr Hosek2017-01-161-2/+5
| | | | | | | | targets" This relands commit r291727. llvm-svn: 292085
* [libc++][CMake] Use debug MSVC runtimes when libc++ is built in debug modeEric Fiselier2017-01-141-3/+10
| | | | | | | | | | | | Summary: This patch allows libc++ to be built against the debug MSVC runtimes instead of just the release ones. Reviewers: rnk, majnemer, compnerd, smeenai Subscribers: mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D28725 llvm-svn: 292006
* [libc++] [CMake] Link with /nodefaultlibs on WindowsEric Fiselier2017-01-141-0/+11
| | | | | | | | | | | | | | | | Summary: This patch attempts to fix the libc++ build/link so that it doesn't use an default C++ libraries on Windows. This is needed to prevent linking to MSVC's STL library. Additionally this patch changes libc++ so that it is always linked with the non-debug DLL's (e.g. `/MD`). This is needed so that the test suite can correctly link the same libraries without needing to know which configuration `c++.dll` was linked with. Reviewers: compnerd, rnk, majnemer, kimgr, awson, halyavin, smeenai Subscribers: cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D28441 llvm-svn: 292001
* Update version to 5.0Eric Fiselier2017-01-132-0/+4280
| | | | llvm-svn: 291928
* Revert "[CMake][libcxx] Do not rely on the existence of c++abi or unwind ↵Petr Hosek2017-01-111-5/+2
| | | | | | | | targets" This reverts commit 94fc5a96f58071703d81d14690094dcd266a5e17. llvm-svn: 291727
* [CMake][libcxx] Do not rely on the existence of c++abi or unwind targetsPetr Hosek2017-01-111-2/+5
| | | | | | | | | | | There is no guaranteed order in which CMake files for individual runtimes are invoked and therefore we cannot rely on existence of targets defined in other runtimes. Use the new HAVE_<name> options instead in those cases. Differential Revision: https://reviews.llvm.org/D28391 llvm-svn: 291632
* [libc++] Cleanup and document <__threading_support>Eric Fiselier2017-01-061-1/+1
| | | | | | | | | | | | | | | Summary: This patch attempts to clean up the macro configuration mess in `<__threading_support>`, specifically the mess involving external threading variants. Additionally this patch adds design documentation for `<__threading_support>` and the configuration macros it uses. The primary change in this patch is separating the idea of an "external API" provided by `<__external_threading>` and the idea of having an external threading library. Now `_LIBCPP_HAS_THREAD_API_EXTERNAL` means that libc++ should use `<__external_threading>` and that the header is expected to exist. Additionally the new macro `_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL` is now used to configure for using an "external library" with the default threading API. Reviewers: compnerd, rmaprath Subscribers: smeenai, cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D28316 llvm-svn: 291275
* build: use the platform dependent library prefix/suffixSaleem Abdulrasool2017-01-041-1/+2
| | | | | | | | Use the cmake variables to get the platform dependent values for the static library prefix and suffix, which can be different from the Unix preference for "lib", ".a" (e.g. Windows uses "", ".lib" respectively). llvm-svn: 290939
* build: use more portable spelling for flagSaleem Abdulrasool2017-01-041-2/+3
| | | | | | | Use `CMAKE_LIBRARY_PATH_FLAG` instead of hard-coding it to -L. This silences a warning with cl which expects `/LIBPATH` instead. llvm-svn: 290938
* Recommit r290839 - Fix configuring and building libc++ w/o an ABI library.Eric Fiselier2017-01-032-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch re-commits a previous attempt to support building libc++ w/o an ABI library. That patch was originally reverted because: 1) It forgot to teach the test suite about "default" ABI libraries. 2) Some LLVM builders don't clear the CMake cache between builds. The previous patch caused those builders to fail since their old cache entry for LIBCXX_CXX_ABI="" is no longer valid. The updated patch addresses both issues. It works around (2) by adding a hack to force the builders to update their cache entries. The hack will be removed shortly once all LLVM builders have run. Original commit message ----------------------- Typically libc++ uses libc++abi or libcxxrt to provide the ABI and runtime bits of the C++ STL. However we also support building w/o an ABI library entirely. This patch fixes building libc++ w/o an ABI library (and incorporates the `~type_info()` fix in D28211). The main changes in this patch are: 1) Add `-DLIBCXX_CXX_ABI=default` instead of using the empty string to mean "default". 2) Fix CMake bits which treated "none" as "default" on OS X. 3) Teach the source files to respect `-D_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY`. 4) Define ~type_info() when _LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY is defined. Unfortunately this patch doesn't help clean up the macro mess that we use to configure for different ABI libraries. llvm-svn: 290849
* Revert r290839 - Fix configuring and building libc++ w/o an ABI libraryEric Fiselier2017-01-022-2/+2
| | | | llvm-svn: 290841
* Fix configuring and building libc++ w/o an ABI library.Eric Fiselier2017-01-022-2/+2
| | | | | | | | | | | | | | | | | | | Typically libc++ uses libc++abi or libcxxrt to provide the ABI and runtime bits of the C++ STL. However we also support building w/o an ABI library entirely. This patch fixes building libc++ w/o an ABI library (and incorporates the `~type_info()` fix in D28211). The main changes in this patch are: 1) Add `-DLIBCXX_CXX_ABI=default` instead of using the empty string to mean "default". 2) Fix CMake bits which treated "none" as "default" on OS X. 3) Teach the source files to respect `-D_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY`. 4) Define ~type_info() when _LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY is defined. Unfortunately this patch doesn't help clean up the macro mess that we use to configure for different ABI libraries. llvm-svn: 290839
* build: tweak macros for Windows buildSaleem Abdulrasool2017-01-021-0/+22
| | | | | | | | | | | Move the windows specific macro definitions for compiling c++ into the target. Add a number of newer options that are necessary to properly build libc++ for windows. This ensures that we do not accidentally autolink msvcprt (Microsoft's C++ runtime library), do not define linker pragmas which are msvcprt specific, and do not accidentally encode the incorrect version of the msvc compatibility version. llvm-svn: 290837
* build: make cross-compiling to Windows work on LinuxSaleem Abdulrasool2017-01-021-0/+7
| | | | | | | | | Disable the manifest bundling on Windows when cross-compiling on not-Windows. With this, it is possible to execute the link command from CMake which will use cmake to invoke the manifest tool to generate a manifest and pass that to the linker. llvm-svn: 290836
* Fix build using the buildit scriptEric Fiselier2016-12-291-1/+1
| | | | llvm-svn: 290727
* Fix debug mode build w/o exceptionsEric Fiselier2016-12-281-1/+1
| | | | llvm-svn: 290652
* Implement a throwing version of _LIBCPP_ASSERT.Eric Fiselier2016-12-283-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | This patch implements changes to allow _LIBCPP_ASSERT to throw on failure instead of aborting. The main changes needed to do this are: 1. Change _LIBCPP_ASSERT to call a handler via a replacable function pointer instead of calling abort directly. Additionally this patch implements two handler functions, one which aborts and another that throws an exception. 2. Add _NOEXCEPT_DEBUG macro for disabling noexcept spec on function which contain _LIBCPP_ASSERT. This is required in order to prevent assertion failures throwing through a noexcept function. This macro has no effect unless _LIBCPP_DEBUG_USE_EXCEPTIONS is defined. Having a non-aborting _LIBCPP_ASSERT is very important to allow sane testing of debug mode. Currently we can only have one test case per file, since the test case will cause the program to abort. Testing debug mode this way would require thousands of test files, most of which would be 95% boiler plate. I don't think this is a feasible strategy. Fortunately using a throwing debug handler solves these issues. Additionally this patch rewrites the documentation for debug mode. llvm-svn: 290651
* [libc++] Make __num_get_float hiddenShoaib Meenai2016-12-241-3/+0
| | | | | | | | | | | It's an internal function and shouldn't be exported. It's also a source of discrepancy in the published ABI list; these symbols aren't exported for me on CentOS 7 or Ubuntu 16.04, leading to spurious check-cxx-abilist failures. Differential Revision: https://reviews.llvm.org/D27153 llvm-svn: 290503
* Update darwin ABI list for <variant>Eric Fiselier2016-12-021-0/+4
| | | | llvm-svn: 288551
* Update ABI lists for <variant>Eric Fiselier2016-12-022-1/+13
| | | | llvm-svn: 288550
* Make LIBCXX_ENABLE_STATIC_ABI_LIBRARY merge libc++.a and libc++abi.aEric Fiselier2016-11-181-0/+22
| | | | llvm-svn: 287373
* update Apples ABI list to ignore non-std symbolsEric Fiselier2016-11-181-2470/+2355
| | | | llvm-svn: 287301
* Change sym_check to filter non-stdlib symbols.Eric Fiselier2016-11-182-2011/+1889
| | | | | | | | | | | Currently sym_check almost all names found in the binary, including those which are defined in other libraries. This makes our ABI lists harder to maintain. This patch adds a --only-stdlib-symbols option to sym_check which removes all symbols which aren't possibly provided by libc++. It also re-generates the linux ABI list after making this change. llvm-svn: 287294
* Fix ABI configuration detection on OS XEric Fiselier2016-11-141-2/+4
| | | | llvm-svn: 286792
* Fix CMake set syntaxEric Fiselier2016-11-141-2/+2
| | | | llvm-svn: 286791
* Add check-cxx-abilist target when supported.Eric Fiselier2016-11-143-0/+26
| | | | | | | | | | | | | This patch adds a `check-cxx-abilist` target which verifies the libc++.so ABI when the current build configuration matches the configuration used to generate the ABI lists. In order to make this change `HandleOutOfTreeLLVM.cmake` needed to be modified to include `LLVMConfig.cmake` so that `TARGET_TRIPLE` is defined. Hopefully the changes needed to accommodate this won't break existing build configurations. llvm-svn: 286789
* Remove additional function template definitions from the dylibEric Fiselier2016-10-312-2/+15
| | | | llvm-svn: 285537
* Revert addition of __libcpp_library_versionEric Fiselier2016-10-283-7/+0
| | | | llvm-svn: 285466
* Update mac ABI listEric Fiselier2016-10-282-1/+2
| | | | llvm-svn: 285383
* Add __libcpp_version file and __libcpp_library_version function.Eric Fiselier2016-10-282-0/+6
| | | | | | | | | | | | | | | This patch does two seperate things. First it adds a file called "__libcpp_version" which only contains the current libc++ version (currently 4000). This file is not intended for use as a header. This file is used by Clang in order to easily determine the installed libc++ version. This allows Clang to enable/disable certain language features only when the library supports them. The second change is the addition of _LIBCPP_LIBRARY_VERSION macro, which returns the version of the installed dylib since it may be different than the headers. llvm-svn: 285382
* Update revision number in CHANGELOG.TXTEric Fiselier2016-10-251-1/+1
| | | | llvm-svn: 285102
* [libcxx] Build with -fvisibility-inlines-hidden -- Remove 20 inline ↵Eric Fiselier2016-10-252-19/+35
| | | | | | | | | | | | | | | | | | | | | definitions from the dylib Summary: This patch turns on `-fvisibility-inlines-hidden` when building the dylib. This is important so that libc++.dylib doesn't accidentally export inline-functions which are ODR used somewhere in the dylib. On OS X this change has no effect on the current ABI of the dylib. Unfortunately on Linux there are already ~20 inline functions which are unintentionally exported by the dylib. Almost all of these are implicitly generated destructors. I believe removing these function definitions is safe because every "linkage unit" which uses these functions has its own definition, and therefore shouldn't be dependent on libc++.dylib to provide them. Also could a FreeBSD maintainer comment on the ABI compatibility of this patch? Reviewers: mclow.lists, emaste, dexonsmith, joker-eph-DISABLED, jroelofs, danalbert, mehdi_amini, compnerd, dim Subscribers: beanz, mgorny, cfe-commits, modocache Differential Revision: https://reviews.llvm.org/D25593 llvm-svn: 285101
* [solaris] Convert the support library to C++ to fix -std=c++11 buildMichal Gorny2016-10-181-1/+1
| | | | | | | | | | | Convert the Solaris xlocale.c compatibility library from plain C to C++ in order to fix the build failures caused by the addition of -std=c++11 to LIBCXX_COMPILE_FLAGS. The additional flag got propagated to the C file, resulting in error with strict compilers. Differential Revision: https://reviews.llvm.org/D25431 llvm-svn: 284494
* Remove dead CMake targetEric Fiselier2016-10-141-4/+0
| | | | llvm-svn: 284216
* Update OS X ABI listEric Fiselier2016-10-141-0/+11
| | | | llvm-svn: 284208
* Correct ABI changelog revision numberEric Fiselier2016-10-141-1/+1
| | | | llvm-svn: 284207
* Implement P0035R4 -- Add C++17 aligned allocation functionsEric Fiselier2016-10-142-0/+27
| | | | | | | | | | | | | | | | Summary: This patch implements the library side of P0035R4. The implementation is thanks to @rsmith. In addition to the C++17 implementation, the library implementation can be explicitly turned on using `-faligned-allocation` in all dialects. Reviewers: mclow.lists, rsmith Subscribers: rsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D25591 llvm-svn: 284206
OpenPOWER on IntegriCloud