aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2025-01-15 09:07:43 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2025-01-15 09:21:02 +0300
commit0c0970273cee95634da050b2ecfed2ca2433a02d (patch)
tree32edfbe8bc7f43f46032a8b8c8755b743a46c96c /contrib
parentfc7eb64e6147971fb5da235644f47a1df89e0de5 (diff)
downloadydb-0c0970273cee95634da050b2ecfed2ca2433a02d.tar.gz
Intermediate changes
commit_hash:27a8662070cd5477654576d993a28c2d23fbe7b9
Diffstat (limited to 'contrib')
-rw-r--r--contrib/libs/cxxsupp/libcxxabi/.yandex_meta/__init__.py44
-rw-r--r--contrib/libs/cxxsupp/libcxxabi/.yandex_meta/devtools.licenses.report8
-rw-r--r--contrib/libs/cxxsupp/libcxxabi/.yandex_meta/override.nix14
-rw-r--r--contrib/libs/cxxsupp/libcxxabi/include/c++/v1/__cxxabi_config.h106
-rw-r--r--contrib/libs/cxxsupp/libcxxabi/include/c++/v1/cxxabi.h177
5 files changed, 32 insertions, 317 deletions
diff --git a/contrib/libs/cxxsupp/libcxxabi/.yandex_meta/__init__.py b/contrib/libs/cxxsupp/libcxxabi/.yandex_meta/__init__.py
index 1ba6085ed2..c77e96a5b3 100644
--- a/contrib/libs/cxxsupp/libcxxabi/.yandex_meta/__init__.py
+++ b/contrib/libs/cxxsupp/libcxxabi/.yandex_meta/__init__.py
@@ -1,5 +1,7 @@
from devtools.yamaker import fileutil
-from devtools.yamaker.project import CMakeNinjaNixProject
+from devtools.yamaker import pathutil
+from devtools.yamaker.modules import Library
+from devtools.yamaker.project import NixSourceProject
def post_install(self):
@@ -17,25 +19,32 @@ def post_install(self):
f"VERSION({self.version})",
)
- with self.yamakes["."] as libcxxabi:
+ self.yamakes["."] = self.module(
+ Library,
+ NO_UTIL=True,
+ NO_RUNTIME=True,
+ NO_COMPILER_WARNINGS=True,
# Files are distributed between libcxxabi and libcxx in a weird manner
# but we can not peerdir the latter to avoid loops (see below)
# FIXME: sort includes open moving glibcxx-shims into its own dir
- libcxxabi.ADDINCL = [
+ SRCS=fileutil.files(self.dstdir, rel=True, test=pathutil.is_source),
+ ADDINCL=[
f"{self.arcdir}/include",
"contrib/libs/cxxsupp/libcxx/include",
# libcxxabi includes libcxx's private "include/refstring.h" header from src subdirectory
"contrib/libs/cxxsupp/libcxx/src",
- ]
-
- # We link libpthread.so automatically depending on the target platform
- libcxxabi.CFLAGS.remove("-D_LIBCXXABI_LINK_PTHREAD_LIB")
-
- libcxxabi.NO_UTIL = True
- libcxxabi.NO_RUNTIME = True
+ ],
+ PEERDIR=[
+ "contrib/libs/libunwind",
+ ],
+ CFLAGS=[
+ "-D_LIBCPP_BUILDING_LIBRARY",
+ "-D_LIBCXXABI_BUILDING_LIBRARY",
+ ],
+ )
- # As of 1.2.3, musl libc does not provide __cxa_thread_atexit_impl.
- libcxxabi.CFLAGS.remove("-DHAVE___CXA_THREAD_ATEXIT_IMPL")
+ with self.yamakes["."] as libcxxabi:
+ # As of 1.2.3, musl libc does not provide __cxa_thread_atexit_impl
libcxxabi.after(
"SRCS",
"""
@@ -68,13 +77,22 @@ def post_install(self):
libcxxabi.PEERDIR.add("library/cpp/sanitizer/include")
-llvm_libcxxabi = CMakeNinjaNixProject(
+libcxxabi = NixSourceProject(
owners=["g:cpp-committee", "g:cpp-contrib"],
arcdir="contrib/libs/cxxsupp/libcxxabi",
nixattr="llvmPackages_16.libcxxabi",
copy_sources=[
"include/__cxxabi_config.h",
"include/cxxabi.h",
+ "src/*.cpp",
+ "src/*.h",
+ "src/demangle/*.cpp",
+ "src/demangle/*.def",
+ "src/demangle/*.h",
+ ],
+ copy_sources_except=[
+ # fake exception implementation which just invokes std::terminate
+ "src/cxa_noexception.cpp",
],
disable_includes=[
"aix_state_tab_eh.inc",
diff --git a/contrib/libs/cxxsupp/libcxxabi/.yandex_meta/devtools.licenses.report b/contrib/libs/cxxsupp/libcxxabi/.yandex_meta/devtools.licenses.report
index c8b0bda349..8c88510b23 100644
--- a/contrib/libs/cxxsupp/libcxxabi/.yandex_meta/devtools.licenses.report
+++ b/contrib/libs/cxxsupp/libcxxabi/.yandex_meta/devtools.licenses.report
@@ -83,8 +83,6 @@ BELONGS ya.make
Links : http://www.apache.org/licenses/, http://www.apache.org/licenses/LICENSE-2.0, https://spdx.org/licenses/Apache-2.0
Files with this license:
include/__cxxabi_config.h [3:4]
- include/c++/v1/__cxxabi_config.h [3:4]
- include/c++/v1/cxxabi.h [3:4]
include/cxxabi.h [3:4]
src/abort_message.cpp [3:4]
src/abort_message.h [3:4]
@@ -122,8 +120,6 @@ BELONGS ya.make
Links : http://llvm.org/foundation/relicensing/LICENSE.txt, https://spdx.org/licenses/LLVM-exception
Files with this license:
include/__cxxabi_config.h [3:4]
- include/c++/v1/__cxxabi_config.h [3:4]
- include/c++/v1/cxxabi.h [3:4]
include/cxxabi.h [3:4]
src/abort_message.cpp [3:4]
src/abort_message.h [3:4]
@@ -201,8 +197,6 @@ BELONGS ya.make
Links : http://www.apache.org/licenses/, http://www.apache.org/licenses/LICENSE-2.0, https://spdx.org/licenses/Apache-2.0
Files with this license:
include/__cxxabi_config.h [5:5]
- include/c++/v1/__cxxabi_config.h [5:5]
- include/c++/v1/cxxabi.h [5:5]
include/cxxabi.h [5:5]
src/abort_message.cpp [5:5]
src/abort_message.h [5:5]
@@ -240,8 +234,6 @@ BELONGS ya.make
Links : http://llvm.org/foundation/relicensing/LICENSE.txt, https://spdx.org/licenses/LLVM-exception
Files with this license:
include/__cxxabi_config.h [5:5]
- include/c++/v1/__cxxabi_config.h [5:5]
- include/c++/v1/cxxabi.h [5:5]
include/cxxabi.h [5:5]
src/abort_message.cpp [5:5]
src/abort_message.h [5:5]
diff --git a/contrib/libs/cxxsupp/libcxxabi/.yandex_meta/override.nix b/contrib/libs/cxxsupp/libcxxabi/.yandex_meta/override.nix
index 6466e5c5e8..e0d5f583e0 100644
--- a/contrib/libs/cxxsupp/libcxxabi/.yandex_meta/override.nix
+++ b/contrib/libs/cxxsupp/libcxxabi/.yandex_meta/override.nix
@@ -8,19 +8,7 @@ pkgs: attrs: with pkgs; with attrs; rec {
hash = "sha256-fspqSReX+VD+Nl/Cfq+tDcdPtnQPV1IRopNDfd5VtUs=";
};
- patches = [
- # https://reviews.llvm.org/D132298, Allow building libcxxabi alone
- (fetchpatch {
- url = "https://github.com/llvm/llvm-project/commit/e6a0800532bb409f6d1c62f3698bdd6994a877dc.patch";
- sha256 = "1xyjd56m4pfwq8p3xh6i8lhkk9kq15jaml7qbhxdf87z4jjkk63a";
- stripLen = 1;
- })
- ];
-
- NIX_CFLAGS_COMPILE = [
- # See DTCC-589 for the details
- "-fno-integrated-cc1"
- ];
+ patches = [];
sourceRoot = "source/libcxxabi";
}
diff --git a/contrib/libs/cxxsupp/libcxxabi/include/c++/v1/__cxxabi_config.h b/contrib/libs/cxxsupp/libcxxabi/include/c++/v1/__cxxabi_config.h
deleted file mode 100644
index c97dd656e1..0000000000
--- a/contrib/libs/cxxsupp/libcxxabi/include/c++/v1/__cxxabi_config.h
+++ /dev/null
@@ -1,106 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef ____CXXABI_CONFIG_H
-#define ____CXXABI_CONFIG_H
-
-#if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \
- !defined(__ARM_DWARF_EH__) && !defined(__SEH__)
-#define _LIBCXXABI_ARM_EHABI
-#endif
-
-#if !defined(__has_attribute)
-#define __has_attribute(_attribute_) 0
-#endif
-
-#if defined(__clang__)
-# define _LIBCXXABI_COMPILER_CLANG
-# ifndef __apple_build_version__
-# define _LIBCXXABI_CLANG_VER (__clang_major__ * 100 + __clang_minor__)
-# endif
-#elif defined(__GNUC__)
-# define _LIBCXXABI_COMPILER_GCC
-#elif defined(_MSC_VER)
-# define _LIBCXXABI_COMPILER_MSVC
-#elif defined(__IBMCPP__)
-# define _LIBCXXABI_COMPILER_IBM
-#endif
-
-#if defined(_WIN32)
- #if defined(_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS)
- #define _LIBCXXABI_HIDDEN
- #define _LIBCXXABI_DATA_VIS
- #define _LIBCXXABI_FUNC_VIS
- #define _LIBCXXABI_TYPE_VIS
- #elif defined(_LIBCXXABI_BUILDING_LIBRARY)
- #define _LIBCXXABI_HIDDEN
- #define _LIBCXXABI_DATA_VIS __declspec(dllexport)
- #define _LIBCXXABI_FUNC_VIS __declspec(dllexport)
- #define _LIBCXXABI_TYPE_VIS __declspec(dllexport)
- #else
- #define _LIBCXXABI_HIDDEN
- #define _LIBCXXABI_DATA_VIS __declspec(dllimport)
- #define _LIBCXXABI_FUNC_VIS __declspec(dllimport)
- #define _LIBCXXABI_TYPE_VIS __declspec(dllimport)
- #endif
-#else
- #if !defined(_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS)
- #define _LIBCXXABI_HIDDEN __attribute__((__visibility__("hidden")))
- #define _LIBCXXABI_DATA_VIS __attribute__((__visibility__("default")))
- #define _LIBCXXABI_FUNC_VIS __attribute__((__visibility__("default")))
- #if __has_attribute(__type_visibility__)
- #define _LIBCXXABI_TYPE_VIS __attribute__((__type_visibility__("default")))
- #else
- #define _LIBCXXABI_TYPE_VIS __attribute__((__visibility__("default")))
- #endif
- #else
- #define _LIBCXXABI_HIDDEN
- #define _LIBCXXABI_DATA_VIS
- #define _LIBCXXABI_FUNC_VIS
- #define _LIBCXXABI_TYPE_VIS
- #endif
-#endif
-
-#if defined(_LIBCXXABI_COMPILER_MSVC)
-#define _LIBCXXABI_WEAK
-#else
-#define _LIBCXXABI_WEAK __attribute__((__weak__))
-#endif
-
-#if defined(__clang__)
-#define _LIBCXXABI_COMPILER_CLANG
-#elif defined(__GNUC__)
-#define _LIBCXXABI_COMPILER_GCC
-#endif
-
-#if __has_attribute(__no_sanitize__) && defined(_LIBCXXABI_COMPILER_CLANG)
-#define _LIBCXXABI_NO_CFI __attribute__((__no_sanitize__("cfi")))
-#else
-#define _LIBCXXABI_NO_CFI
-#endif
-
-// wasm32 follows the arm32 ABI convention of using 32-bit guard.
-#if defined(__arm__) || defined(__wasm32__) || defined(__ARM64_ARCH_8_32__)
-# define _LIBCXXABI_GUARD_ABI_ARM
-#endif
-
-#if defined(_LIBCXXABI_COMPILER_CLANG)
-# if !__has_feature(cxx_exceptions)
-# define _LIBCXXABI_NO_EXCEPTIONS
-# endif
-#elif defined(_LIBCXXABI_COMPILER_GCC) && !defined(__EXCEPTIONS)
-# define _LIBCXXABI_NO_EXCEPTIONS
-#endif
-
-#if defined(_WIN32)
-#define _LIBCXXABI_DTOR_FUNC __thiscall
-#else
-#define _LIBCXXABI_DTOR_FUNC
-#endif
-
-#endif // ____CXXABI_CONFIG_H
diff --git a/contrib/libs/cxxsupp/libcxxabi/include/c++/v1/cxxabi.h b/contrib/libs/cxxsupp/libcxxabi/include/c++/v1/cxxabi.h
deleted file mode 100644
index 85cb4b36b8..0000000000
--- a/contrib/libs/cxxsupp/libcxxabi/include/c++/v1/cxxabi.h
+++ /dev/null
@@ -1,177 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef __CXXABI_H
-#define __CXXABI_H
-
-/*
- * This header provides the interface to the C++ ABI as defined at:
- * https://itanium-cxx-abi.github.io/cxx-abi/
- */
-
-#include <stddef.h>
-#include <stdint.h>
-
-#include <__cxxabi_config.h>
-
-#define _LIBCPPABI_VERSION 15000
-#define _LIBCXXABI_NORETURN __attribute__((noreturn))
-#define _LIBCXXABI_ALWAYS_COLD __attribute__((cold))
-
-#ifdef __cplusplus
-
-namespace std {
-#if defined(_WIN32)
-class _LIBCXXABI_TYPE_VIS type_info; // forward declaration
-#else
-class type_info; // forward declaration
-#endif
-}
-
-
-// runtime routines use C calling conventions, but are in __cxxabiv1 namespace
-namespace __cxxabiv1 {
-extern "C" {
-
-// 2.4.2 Allocating the Exception Object
-extern _LIBCXXABI_FUNC_VIS void *
-__cxa_allocate_exception(size_t thrown_size) throw();
-extern _LIBCXXABI_FUNC_VIS void
-__cxa_free_exception(void *thrown_exception) throw();
-
-// 2.4.3 Throwing the Exception Object
-extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void
-__cxa_throw(void *thrown_exception, std::type_info *tinfo,
- void (_LIBCXXABI_DTOR_FUNC *dest)(void *));
-
-// 2.5.3 Exception Handlers
-extern _LIBCXXABI_FUNC_VIS void *
-__cxa_get_exception_ptr(void *exceptionObject) throw();
-extern _LIBCXXABI_FUNC_VIS void *
-__cxa_begin_catch(void *exceptionObject) throw();
-extern _LIBCXXABI_FUNC_VIS void __cxa_end_catch();
-#if defined(_LIBCXXABI_ARM_EHABI)
-extern _LIBCXXABI_FUNC_VIS bool
-__cxa_begin_cleanup(void *exceptionObject) throw();
-extern _LIBCXXABI_FUNC_VIS void __cxa_end_cleanup();
-#endif
-extern _LIBCXXABI_FUNC_VIS std::type_info *__cxa_current_exception_type();
-
-// 2.5.4 Rethrowing Exceptions
-extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_rethrow();
-
-// 2.6 Auxiliary Runtime APIs
-extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_bad_cast(void);
-extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_bad_typeid(void);
-extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void
-__cxa_throw_bad_array_new_length(void);
-
-// 3.2.6 Pure Virtual Function API
-extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_pure_virtual(void);
-
-// 3.2.7 Deleted Virtual Function API
-extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_deleted_virtual(void);
-
-// 3.3.2 One-time Construction API
-#if defined(_LIBCXXABI_GUARD_ABI_ARM)
-extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_ALWAYS_COLD int __cxa_guard_acquire(uint32_t *);
-extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_ALWAYS_COLD void __cxa_guard_release(uint32_t *);
-extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_ALWAYS_COLD void __cxa_guard_abort(uint32_t *);
-#else
-extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_ALWAYS_COLD int __cxa_guard_acquire(uint64_t *);
-extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_ALWAYS_COLD void __cxa_guard_release(uint64_t *);
-extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_ALWAYS_COLD void __cxa_guard_abort(uint64_t *);
-#endif
-
-// 3.3.3 Array Construction and Destruction API
-extern _LIBCXXABI_FUNC_VIS void *
-__cxa_vec_new(size_t element_count, size_t element_size, size_t padding_size,
- void (*constructor)(void *), void (*destructor)(void *));
-
-extern _LIBCXXABI_FUNC_VIS void *
-__cxa_vec_new2(size_t element_count, size_t element_size, size_t padding_size,
- void (*constructor)(void *), void (*destructor)(void *),
- void *(*alloc)(size_t), void (*dealloc)(void *));
-
-extern _LIBCXXABI_FUNC_VIS void *
-__cxa_vec_new3(size_t element_count, size_t element_size, size_t padding_size,
- void (*constructor)(void *), void (*destructor)(void *),
- void *(*alloc)(size_t), void (*dealloc)(void *, size_t));
-
-extern _LIBCXXABI_FUNC_VIS void
-__cxa_vec_ctor(void *array_address, size_t element_count, size_t element_size,
- void (*constructor)(void *), void (*destructor)(void *));
-
-extern _LIBCXXABI_FUNC_VIS void __cxa_vec_dtor(void *array_address,
- size_t element_count,
- size_t element_size,
- void (*destructor)(void *));
-
-extern _LIBCXXABI_FUNC_VIS void __cxa_vec_cleanup(void *array_address,
- size_t element_count,
- size_t element_size,
- void (*destructor)(void *));
-
-extern _LIBCXXABI_FUNC_VIS void __cxa_vec_delete(void *array_address,
- size_t element_size,
- size_t padding_size,
- void (*destructor)(void *));
-
-extern _LIBCXXABI_FUNC_VIS void
-__cxa_vec_delete2(void *array_address, size_t element_size, size_t padding_size,
- void (*destructor)(void *), void (*dealloc)(void *));
-
-extern _LIBCXXABI_FUNC_VIS void
-__cxa_vec_delete3(void *__array_address, size_t element_size,
- size_t padding_size, void (*destructor)(void *),
- void (*dealloc)(void *, size_t));
-
-extern _LIBCXXABI_FUNC_VIS void
-__cxa_vec_cctor(void *dest_array, void *src_array, size_t element_count,
- size_t element_size, void (*constructor)(void *, void *),
- void (*destructor)(void *));
-
-// 3.3.5.3 Runtime API
-// These functions are part of the C++ ABI, but they are not defined in libc++abi:
-// int __cxa_atexit(void (*)(void *), void *, void *);
-// void __cxa_finalize(void *);
-
-// 3.4 Demangler API
-extern _LIBCXXABI_FUNC_VIS char *__cxa_demangle(const char *mangled_name,
- char *output_buffer,
- size_t *length, int *status);
-
-// Apple additions to support C++ 0x exception_ptr class
-// These are primitives to wrap a smart pointer around an exception object
-extern _LIBCXXABI_FUNC_VIS void *__cxa_current_primary_exception() throw();
-extern _LIBCXXABI_FUNC_VIS void
-__cxa_rethrow_primary_exception(void *primary_exception);
-extern _LIBCXXABI_FUNC_VIS void
-__cxa_increment_exception_refcount(void *primary_exception) throw();
-extern _LIBCXXABI_FUNC_VIS void
-__cxa_decrement_exception_refcount(void *primary_exception) throw();
-
-// Apple extension to support std::uncaught_exception()
-extern _LIBCXXABI_FUNC_VIS bool __cxa_uncaught_exception() throw();
-extern _LIBCXXABI_FUNC_VIS unsigned int __cxa_uncaught_exceptions() throw();
-
-#if defined(__linux__) || defined(__Fuchsia__)
-// Linux and Fuchsia TLS support. Not yet an official part of the Itanium ABI.
-// https://sourceware.org/glibc/wiki/Destructor%20support%20for%20thread_local%20variables
-extern _LIBCXXABI_FUNC_VIS int __cxa_thread_atexit(void (*)(void *), void *,
- void *) throw();
-#endif
-
-} // extern "C"
-} // namespace __cxxabiv1
-
-namespace abi = __cxxabiv1;
-
-#endif // __cplusplus
-
-#endif // __CXXABI_H