summaryrefslogtreecommitdiff
path: root/libcxxabi
Commit message (Collapse)AuthorAgeFilesLines
* [libcxxabi] define _LIBCPP_VERBOSE_ABORTNick Desaulniers2023-05-172-0/+6
| | | | | | | | | | | | | | | libc++ may be built with or without assertions. This causes definitions of various methods of std::string_view to contain assertions and calls to __libcpp_verbose_abort which libcxxabi does not provide. libcxxabi does provide abort_message with the same interface, so define _LIBCPP_VERBOSE_ABORT to use that. Otherwise D148566 will trigger linkage failures for the missing symbol __libcpp_verbose_abort. Link: https://libcxx.llvm.org/UsingLibcxx.html#enabling-the-safe-libc-mode Reviewed By: #libc_abi, philnik, ldionne Differential Revision: https://reviews.llvm.org/D149092
* Revert "Reland "[CMake] Bumps minimum version to 3.20.0.""Nico Weber2023-05-171-1/+1
| | | | | | | | | | | | | | This reverts commit 65429b9af6a2c99d340ab2dcddd41dab201f399c. Broke several projects, see https://reviews.llvm.org/D144509#4347562 onwards. Also reverts follow-up commit "[OpenMP] Compile assembly files as ASM, not C" This reverts commit 4072c8aee4c89c4457f4f30d01dc9bb4dfa52559. Also reverts fix attempt "[cmake] Set CMP0091 to fix Windows builds after the cmake_minimum_required bump" This reverts commit 7d47dac5f828efd1d378ba44a97559114f00fb64.
* Reland "[CMake] Bumps minimum version to 3.20.0."Mark de Wever2023-05-131-1/+1
| | | | | | The owner of the last two failing buildbots updated CMake. This reverts commit e8e8707b4aa6e4cc04c0cffb2de01d2de71165fc.
* Revert "Reland "[CMake] Bumps minimum version to 3.20.0.""Mark de Wever2023-05-061-1/+1
| | | | | | Unfortunatly not all buildbots are updated. This reverts commit ffb807ab5375b3f78df198dc5d4302b3b552242f.
* Reland "[CMake] Bumps minimum version to 3.20.0."Mark de Wever2023-05-061-1/+1
| | | | | | All build bots should be updated now. This reverts commit 44d38022ab29a3156349602733b3459df5beef93.
* [libcxx] [test] Prepend to PATH instead of overriding itMartin Storsjö2023-04-273-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows, the PATH env variable is used for locating dynamically linked librarys, akin to LD_LIBRARY_PATH on Linux. The tests that run with a dynamically linked libc++ used "--env PATH=%{lib}" in the test config. This had the unfortunate side effect of making other tools from PATH unavailable during the runtime of the tests; in particular, it caused the "executor-has-no-bash" flag to be set for all those Windows test configs (with the clang-cl static config being the only one lacking it). Thus, this increases the number of tests actually included in the clang-cl dll and all mingw test configs by 9 tests. The clang-cl static test configuration has been executing those tests since the "--env PATH=%{lib}" was removed from that test config in e78223e79efc886ef6f0ea5413deab3737d6d63b. (For mingw we haven't had a need to split the test config between shared and static, which means that the mingw static test config previously ran with --env PATH needlessly.) This increases the test coverage for patches like D146398 which can't be executed in the executor-has-no-bash configs. Change the default value of the arg.env to an empty array; when we do pass values to the option, they get passed as an array of strings, so make sure the variable behaves consistently when no arguments have been passed. Differential Revision: https://reviews.llvm.org/D148324
* [SystemZ][z/OS] Make LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL available for ↵Zibi Sarbinowski2023-04-211-3/+3
| | | | | | | | | | external unwind library. On z/OS, we need to pass the location of unwind interface header when building cxxabi. The cmake macro `LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL` is available for this purpose but it is only used with conjunction with `LIBCXXABI_USE_LLVM_UNWINDER`. For the external unwind library we need to use LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL unconditionally whenever it is set. Reviewed By: #libc_abi, muiez, phosek, SeanP Differential Revision: https://reviews.llvm.org/D147460
* [libc++][PSTL] Remove current integrationNikolas Klauser2023-04-211-10/+0
| | | | | | | | | | We decided to go a different route. To make the switch easier, rip out the old integration first and build on a clean base. Reviewed By: ldionne, #libc, #libc_abi Spies: arichardson, libcxx-commits Differential Revision: https://reviews.llvm.org/D148480
* [libcxxabi][demangle] create helper for std::string_view::starts_withNick Desaulniers2023-04-202-1/+35
| | | | | | | | | | | | | Add C++ 20 style starts_with to replace StringView::startsWith in LLVMDemangle. Due to library layering (LLVMSupport depends on LLVMDemangle), we add the utility header under llvm/Demangle, instead of llvm/ADT or llvm/Support. Modify this in libcxxabi, then copy this over to llvm. Reviewed By: MaskRay, #libc_abi, phosek Differential Revision: https://reviews.llvm.org/D148556
* [libc++abi] Make the error message for recursive initialization of ↵Louis Dionne2023-04-191-3/+3
| | | | | | | | | | | function-local statics more explicit The new message is a bit verbose, but it makes it clearer that this isn't a problem in libc++abi, but instead a problem in the user's code. Otherwise, we get bugs sent down to libc++abi because people see this message in their crash logs. Differential Revision: https://reviews.llvm.org/D148630
* [libcxxabi] [test] Fix the mingw test configMartin Storsjö2023-04-191-1/+1
| | | | | | | | | | | Don't link libc++abi separately in addition to the main -lc++; in mingw build configs, libc++abi is always bundled into libc++ (via LIBCXX_ENABLE_STATIC_ABI_LIBRARY). In the case of a shared linked libc++, linking a separate static libc++abi leads to linker errors. Differential Revision: https://reviews.llvm.org/D147638
* [libcxxabi] [test] Avoid mingw warnings about missing a return statementMartin Storsjö2023-04-191-1/+1
| | | | | | | | | | | | | With current versions of mingw-w64 headers, code following assert(false) isn't considered unreachable - thus add a dummy "return nullptr;", to avoid warnings (treated as errors) for a missing return statement. The root cause does get fixed further upstream in mingw-w64 in https://github.com/mingw-w64/mingw-w64/commit/1690994f515910a31b9fb7c7bd3a52d4ba987abe though. Differential Revision: https://reviews.llvm.org/D147860
* [libcxxabi] Omit dllimport in public headers in MinGW modeMartin Storsjö2023-04-191-1/+1
| | | | | | | | | | | | | | This matches the corresponding change to libcxx headers in dfa88927ae1411ccc3b248b7e624f2acf623d947. This avoids needing to define _LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS when building libcxxabi tests, for two reasons: - It defaults to normal linkage (as opposed to dllimport), fixing linking of a static library version of libcxx/libcxxabi - It avoids issues with using dllimport declarations on symbols when including cxxabi implementations into the testcase itself Differential Revision: https://reviews.llvm.org/D148441
* [libcxxabi] [test] Use the correct printf formats for printing pointersMartin Storsjö2023-04-171-2/+3
| | | | | | | Don't cast the pointers to long, as that's not large enough for pointers on 64 bit Windows. Differential Revision: https://reviews.llvm.org/D147640
* Revert "Revert "Revert "[CMake] Bumps minimum version to 3.20.0."""Mark de Wever2023-04-151-1/+1
| | | | | | This reverts commit 1ef4c3c859728008cf707cad8d67f45ae5070ae1. Two buildbots still haven't been updated.
* Revert "Revert "[CMake] Bumps minimum version to 3.20.0.""Mark de Wever2023-04-151-1/+1
| | | | | | This reverts commit 92523a35a827539db8557bbc3ecab7f9ea3f6ade. Reland to see whether CIs are updated.
* [libcxxabi] [test] Don't cast a pointer to long, fixing the test on WindowsMartin Storsjö2023-04-121-1/+2
| | | | | | | Use uintptr_t instead. On Windows, long is 32 bit even on 64 bit architectures. Differential Revision: https://reviews.llvm.org/D147639
* [libcxxabi, libunwind] [test] Place output from tests under a 'test' subdirMartin Storsjö2023-04-111-1/+1
| | | | | | | | | | | | | | Previously, all the output from the tests were placed directly in the build directory. The tests produce a couple directories named `__config_{exec,cache,src}__` which are easy to distinguish, and the output from the individual tests were placed directly in a directory named `Output`. This is the same change as 736c6e246f5398331d83edd204a846cc967ad5c6, but for the libcxxabi and libunwind test suites. Differential Revision: https://reviews.llvm.org/D147628
* [libcxxabi] [test] Mark thread_local_destruction_order.pass.cpp unsupported ↵Martin Storsjö2023-04-111-0/+7
| | | | | | | | | | | | | | | for mingw targets With current versions of mingw-w64, TLS destructors that are registered while executing TLS destructors are lost and leaked. The root cause does get fixed further upstream in mingw-w64 in https://github.com/mingw-w64/mingw-w64/commit/71eddccd746c56d9cde28bb5620d027d49259de9 though, but mark the test as unsupported for now. The marking can be removed later when the version used in the CI runner has been updated to include the fix. Differential Revision: https://reviews.llvm.org/D147859
* [libcxxabi, libunwind] [test] Quote the python path properly for LIB*_EXECUTORMartin Storsjö2023-04-061-1/+1
| | | | | | | | | | This is the same as c218c80c730a14a1cbcebd588b18220a879702c6, but for libcxxabi and libunwind. This fixes running tests on Windows with Python installed in e.g. "C:\Program Files\Python38". Differential Revision: https://reviews.llvm.org/D147629
* [libc++] Use the stdlib=<LIB> Lit feature instead of use_system_cxx_libLouis Dionne2023-03-3018-23/+23
| | | | | | | | | | | | | | | | | | | The use_system_cxx_lib Lit feature was only used for back-deployment testing. However, one immense hole in that setup was that we didn't have a proper way to test Apple's own libc++ outside of back-deployment, which was embodied by the fact that we needed to define _LIBCPP_DISABLE_AVAILABILITY when testing (see change in libcxx/utils/libcxx/test/params.py). This led to the apple-system testing configuration not checking for availability markup, which is obviously quite bad since the library we ship actually has availability markup. Using stdlib=<VENDOR>-libc++ instead to encode back-deployment restrictions on tests is simpler and it makes it possible to naturally support tests such as availability markup checking even in the tip-of-trunk Apple-libc++ configuration. Differential Revision: https://reviews.llvm.org/D146366
* [libcxxabi] Fix for c9d36bd80760db14f14b33789e6cbc6cb8c64830Dmitry Chernenkov2023-03-201-0/+1
| | | | Otherwise fails with LIBCPP_REMOVE_TRANSITIVE_INCLUDES
* [libcxxabi][Demangle] Don't drop ctor/dtor name for abi-tagged structuresMichael Buch2023-03-192-0/+4
| | | | | | | | | | | | | | | | | | | | Before this patch we would demangle abi-tagged structures as follows: ``` $ c++filt -n _ZN1SB5OuterC2Ev S[abi:Outer]:() $ c++filt -n _ZN1SB5OuterD2Ev S[abi:Outer]::~() ``` This is because `Node::getBaseName` was unimplemented for the `AbiTagAttr` node, which meant that when we tried printing `CtorDtorName` where its `Basename` `Node` was an `AbiTagAttr`, we'd drop the name. Addresses https://github.com/llvm/llvm-project/issues/61213 Differential Revision: https://reviews.llvm.org/D145492
* [libc++abi] Improve performance of __dynamic_castSirui Mu2023-03-191-62/+124
| | | | | | | | | | The original `__dynamic_cast` implementation does not use the ABI-provided `src2dst_offset` parameter which helps improve performance on the hot paths. This patch improves the performance on the hot paths in `__dynamic_cast` by leveraging hints provided by the `src2dst_offset` parameter. This patch also includes a performance benchmark suite for the `__dynamic_cast` implementation. Reviewed By: philnik, ldionne, #libc, #libc_abi, avogelsgesang Spies: mikhail.ramalho, avogelsgesang, xingxue, libcxx-commits Differential Revision: https://reviews.llvm.org/D138005
* Revert "Reland "[CMake] Bumps minimum version to 3.20.0.""Mark de Wever2023-03-181-1/+1
| | | | | | This reverts commit a72165e5df59032cdd54dcb18155f2630d73abd1. Some buildbots have not been updated yet.
* Reland "[CMake] Bumps minimum version to 3.20.0."Mark de Wever2023-03-181-1/+1
| | | | | | This reverts commit 92523a35a827539db8557bbc3ecab7f9ea3f6ade. Test whether all CI runners are updated.
* [libc++][NFC] Move the stdlib= test suite configuration for Apple into the ↵Louis Dionne2023-03-172-0/+4
| | | | | | cfg.in files This centralizes where configuration lives.
* [runtimes] Synchronize warnings flags between libc++/libc++abi/libunwindNikolas Klauser2023-03-173-36/+15
| | | | | | | | | | This mostly keeps the same warning flags. The most important exceptions are `-Wpedantic` and `-Wconversion`, which are now removed from libc++abi and libunwind. Reviewed By: ldionne, #libunwind, #libc, #libc_abi Spies: mikhail.ramalho, phosek, libcxx-commits Differential Revision: https://reviews.llvm.org/D144252
* [HWASAN] Remove RUN statements, which have to effect on the testKirill Stoimenov2023-03-162-2/+0
|
* [HWASAN] Disable leak checking for forced_unwind2.pass.cppKirill Stoimenov2023-03-161-0/+1
|
* [HWASAN] Disable leak checking for test_vector2.pass.cppKirill Stoimenov2023-03-161-0/+1
|
* [libc++] Granularize <type_traits> includesNikolas Klauser2023-03-081-0/+1
| | | | | | | | Reviewed By: ldionne, #libc, #libc_abi Spies: #libc_vendors, smeenai, libcxx-commits Differential Revision: https://reviews.llvm.org/D145320
* [libc++] Enable -Wunused-templateNikolas Klauser2023-03-081-0/+11
| | | | | | | | | | Clang wants to enable this flag by default, but libc++ isn't working with it yet. Reviewed By: Mordante, #libc, #libc_abi, EricWF Spies: libcxx-commits, arichardson Differential Revision: https://reviews.llvm.org/D144667
* Revert "[CMake] Bumps minimum version to 3.20.0."Mark de Wever2023-03-041-1/+1
| | | | | | | Some build bots have not been updated to the new minimal CMake version. Reverting for now and ping the buildbot owners. This reverts commit 44c6b905f8527635e49bb3ea97dea315f92d38ec.
* [CMake] Bumps minimum version to 3.20.0.Mark de Wever2023-03-041-1/+1
| | | | | | | | | | | | | | This partly undoes D137724. This change has been discussed on discourse https://discourse.llvm.org/t/rfc-upgrading-llvms-minimum-required-cmake-version/66193 Note this does not remove work-arounds for older CMake versions, that will be done in followup patches. Reviewed By: mehdi_amini, MaskRay, ChuanqiXu, to268, thieta, tschuett, phosek, #libunwind, #libc_vendors, #libc, #libc_abi, sivachandra, philnik, zibi Differential Revision: https://reviews.llvm.org/D144509
* [z/OS][NFC] Remove obsolete code.Zibi Sarbinowski2023-02-241-4/+0
| | | | | | | | Remoce obsolete code from libcxxabi/CMakeLists.txt Reviewed By: #libc_abi, abhina.sreeskantharajan, phosek Differential Revision: https://reviews.llvm.org/D144573
* [libc++] Move constexpr <cstring> functions into their own headers and ↵Nikolas Klauser2023-02-211-1/+2
| | | | | | | | | | remove unused <cstring> includes Reviewed By: ldionne, Mordante, #libc, #libc_abi Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D143329
* [runtimes] Remove add_target_flags* functions and use add_flags* insteadNikolas Klauser2023-02-212-33/+2
| | | | | | | | Reviewed By: phosek, #libunwind, #libc, #libc_abi Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D144398
* [runtimes] Move common functions from ↵Nikolas Klauser2023-02-212-112/+2
| | | | | | | | | | Handle{Libcxx,Libcxxabi,Libunwind}Flags.cmake to runtimes/cmake/Modules/HandleFlags.cmake Reviewed By: phosek, #libunwind, #libc, #libc_abi Spies: arichardson, libcxx-commits Differential Revision: https://reviews.llvm.org/D144395
* [libunwind][PowerPC] Fix saving/restoring VSX registers on LE systemsNemanja Ivanovic2023-02-161-0/+90
| | | | | | | | | | | | | | Currently, libunwind just uses stxvd2x/lxvd2x to save/restore VSX registers respectively. This puts the registers in doubleword-reversed order into memory on little endian systems. If both the save and restore are done the same way, this isn't a problem. However if the unwinder is just restoring a callee-saved register, it will restore it in the wrong order (since function prologues save them in the correct order). This patch adds the necessary swaps before the saves and after the restores. Differential revision: https://reviews.llvm.org/D137599
* [libc++abi][AIX] Skip non-C++ EH aware frames when retrieving exception objectXing Xue2023-02-153-29/+1456
| | | | | | | | | Summary: The personality routine for the legacy AIX xlclang++ compiler uses the stack slot reserved for compilers to pass the exception object to the landing pad. The landing pad retrieves the exception object with a call to the runtime function __xlc_exception_handle(). The current implementation incorrectly assumes that __xlc_exception_handle() should go up one stack frame to get to the stack frame of the caller of __xlc_exception_handle(), which is supposedly the stack frame of the function containing the landing pad. However, this does not always work, e.g., the xlclang++ compiler sometimes generates a wrapper of __xlc_exception_handle() and calls the wrapper from the landing pad for optimization purposes. This patch changes the implementation to unwind the stack from __xlc_exception_handle() and skip frames not associated with functions that are C++ EH-aware until a frame associated with a C++ EH-aware function is found and then retrieving the exception object with the expectation that the located frame is the one that the personality routine installed as it transferred control to the landing pad. Reviewed by: cebowleratibm, hubert.reinterpretcast, daltenty Differential Revision: https://reviews.llvm.org/D143010
* [runtimes] Remove duplicate imports of libcxx.test.configLouis Dionne2023-02-143-3/+3
|
* [runtimes] Rename newconfig.py to config.py -- it's not new anymoreLouis Dionne2023-02-1410-20/+20
| | | | Differential Revision: https://reviews.llvm.org/D144031
* [libc++] Move the definition of aligned allocation helpers outside of <new>Louis Dionne2023-01-263-2/+6
| | | | | | | | | They are not needed in <new> -- in fact they are only needed in .cpp files. Getting those out of the way makes the headers smaller and also makes it easier to use the library on platforms where aligned allocation is not available. Differential Revision: https://reviews.llvm.org/D139231
* [libc++] Add FreeBSD XFAILs in preparation for CIEd Maste2023-01-201-0/+2
| | | | | | | | | | This at least allows us to stand up libc++ FreeBSD CI and avoid future regressions. The failures do need to be addressed, and can be done iteratively. Reviewed By: philnik, Mordante Differential Revision: https://reviews.llvm.org/D141542
* [libc++] Granularize <type_traits> includes in <utility>Nikolas Klauser2022-12-222-0/+2
| | | | | | | | Reviewed By: Mordante, #libc Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D140426
* [libcxxabi] Use 'target=' consistentlyPaul Robinson2022-12-212-2/+2
|
* [libc++][Android] Include cstdlib to define __BIONIC__Ryan Prichard2022-12-091-0/+2
| | | | | | | | | __ANDROID__ is a built-in compiler macro, but __BIONIC__ is defined by the libc header. Reviewed By: #libc_abi, compnerd Differential Revision: https://reviews.llvm.org/D137128
* [demangler][LoongArch] Correct the mangled_size for long doubleWeining Lu2022-12-081-1/+1
| | | | | | | | | | | The size of long double in LoongArch (both LA32 and LA64) is 16 bytes, thus the mangled_size should be 32. This is same as RISCV's change in D126480. Reviewed By: xen0n Differential Revision: https://reviews.llvm.org/D138981
* Revert "[CMake] Use LLVM_TARGET_TRIPLE in runtimes"Leonard Chan2022-12-052-3/+3
| | | | | | | | | | | | | | This reverts commit bec8a372fc0db95852748691c0f4933044026b25. This causes many of these errors to appear when rebuilding runtimes part of fuchsia's toolchain: ld.lld: error: /usr/local/google/home/paulkirth/llvm-upstream/build/lib/x86_64-unknown-linux-gnu/libunwind.a(libunwind.cpp.o) is incompatible with elf64-x86-64 This can be reproduced by making a complete toolchain, saving any source file with no changes, then rerunning ninja distribution.