diff --git a/lib/libcxx/src/support/solaris/README b/lib/libcxx/src/support/solaris/README deleted file mode 100644 index 89c887a3b..000000000 --- a/lib/libcxx/src/support/solaris/README +++ /dev/null @@ -1,4 +0,0 @@ -This directory contains a partial implementation of the xlocale APIs for -Solaris. Some portions are lifted from FreeBSD libc, and so are covered by a -2-clause BSD license instead of the MIT/UUIC license that the rest of libc++ is -distributed under. diff --git a/lib/libcxxabi/src/demangle/.clang-format b/lib/libcxxabi/src/demangle/.clang-format deleted file mode 100644 index 5bead5f39..000000000 --- a/lib/libcxxabi/src/demangle/.clang-format +++ /dev/null @@ -1,2 +0,0 @@ -BasedOnStyle: LLVM - diff --git a/lib/libcxxabi/src/demangle/README.txt b/lib/libcxxabi/src/demangle/README.txt deleted file mode 100644 index 514ff6dd1..000000000 --- a/lib/libcxxabi/src/demangle/README.txt +++ /dev/null @@ -1,52 +0,0 @@ -Itanium Name Demangler Library -============================== - -Introduction ------------- - -This directory contains the generic itanium name demangler library. The main -purpose of the library is to demangle C++ symbols, i.e. convert the string -"_Z1fv" into "f()". You can also use the CRTP base ManglingParser to perform -some simple analysis on the mangled name, or (in LLVM) use the opaque -ItaniumPartialDemangler to query the demangled AST. - -Why are there multiple copies of the this library in the source tree? ---------------------------------------------------------------------- - -This directory is mirrored between libcxxabi/demangle and -llvm/include/llvm/Demangle. The simple reason for this is that both projects -need to demangle symbols, but neither can depend on each other. libcxxabi needs -the demangler to implement __cxa_demangle, which is part of the itanium ABI -spec. LLVM needs a copy for a bunch of places, but doesn't want to use the -system's __cxa_demangle because it a) might not be available (i.e., on Windows), -and b) probably isn't that up-to-date on the latest language features. - -The copy of the demangler in LLVM has some extra stuff that aren't needed in -libcxxabi (ie, the MSVC demangler, ItaniumPartialDemangler), which depend on the -shared generic components. Despite these differences, we want to keep the "core" -generic demangling library identical between both copies to simplify development -and testing. - -If you're working on the generic library, then do the work first in libcxxabi, -then run the cp-to-llvm.sh script in src/demangle. This script takes as an -argument the path to llvm, and re-copies the changes you made to libcxxabi over. -Note that this script just blindly overwrites all changes to the generic library -in llvm, so be careful. - -Because the core demangler needs to work in libcxxabi, everything needs to be -declared in an anonymous namespace (see DEMANGLE_NAMESPACE_BEGIN), and you can't -introduce any code that depends on the libcxx dylib. - -Hopefully, when LLVM becomes a monorepo, we can de-duplicate this code, and have -both LLVM and libcxxabi depend on a shared demangler library. - -Testing -------- - -The tests are split up between libcxxabi/test/{unit,}test_demangle.cpp, and -llvm/unittest/Demangle. The llvm directory should only get tests for stuff not -included in the core library. In the future though, we should probably move all -the tests to LLVM. - -It is also a really good idea to run libFuzzer after non-trivial changes, see -libcxxabi/fuzz/cxa_demangle_fuzzer.cpp and https://llvm.org/docs/LibFuzzer.html. diff --git a/lib/libcxxabi/src/demangle/cp-to-llvm.sh b/lib/libcxxabi/src/demangle/cp-to-llvm.sh deleted file mode 100755 index 808abbcd9..000000000 --- a/lib/libcxxabi/src/demangle/cp-to-llvm.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -# Copies the 'demangle' library, excluding 'DemangleConfig.h', to llvm. If no -# llvm directory is specified, then assume a monorepo layout. - -set -e - -FILES="ItaniumDemangle.h StringView.h Utility.h README.txt" -LLVM_DEMANGLE_DIR=$1 - -if [[ -z "$LLVM_DEMANGLE_DIR" ]]; then - LLVM_DEMANGLE_DIR="../../../llvm/include/llvm/Demangle" -fi - -if [[ ! -d "$LLVM_DEMANGLE_DIR" ]]; then - echo "No such directory: $LLVM_DEMANGLE_DIR" >&2 - exit 1 -fi - -read -p "This will overwrite the copies of $FILES in $LLVM_DEMANGLE_DIR; are you sure? [y/N]" -n 1 -r ANSWER -echo - -if [[ $ANSWER =~ ^[Yy]$ ]]; then - for I in $FILES ; do - cp $I $LLVM_DEMANGLE_DIR/$I - done -fi diff --git a/src/install_files.h b/src/install_files.h index 8e7431145..90dd085aa 100644 --- a/src/install_files.h +++ b/src/install_files.h @@ -1853,18 +1853,20 @@ static const char *ZIG_LIBCXXABI_FILES[] = { "src/cxa_noexception.cpp", "src/cxa_personality.cpp", "src/cxa_thread_atexit.cpp", -"src/cxa_unexpected.cpp", "src/cxa_vector.cpp", "src/cxa_virtual.cpp", "src/fallback_malloc.cpp", "src/private_typeinfo.cpp", "src/stdlib_exception.cpp", +"src/stdlib_new_delete.cpp", "src/stdlib_stdexcept.cpp", "src/stdlib_typeinfo.cpp", }; static const char *ZIG_LIBCXX_FILES[] = { "src/algorithm.cpp", "src/any.cpp", +"src/atomic.cpp", +"src/barrier.cpp", "src/bind.cpp", "src/charconv.cpp", "src/chrono.cpp", @@ -1874,6 +1876,7 @@ static const char *ZIG_LIBCXX_FILES[] = { "src/exception.cpp", "src/experimental/memory_resource.cpp", "src/filesystem/directory_iterator.cpp", +"src/filesystem/int128_builtins.cpp", "src/filesystem/operations.cpp", "src/functional.cpp", "src/future.cpp", @@ -1887,6 +1890,7 @@ static const char *ZIG_LIBCXX_FILES[] = { "src/new.cpp", "src/optional.cpp", "src/random.cpp", +"src/random_shuffle.cpp", "src/regex.cpp", "src/shared_mutex.cpp", "src/stdexcept.cpp",