Base: codex-main originale (prima del fork aKode)
This commit is contained in:
205
third_party/v8/libcxx.BUILD.bazel
vendored
Normal file
205
third_party/v8/libcxx.BUILD.bazel
vendored
Normal file
@@ -0,0 +1,205 @@
|
||||
load("@//third_party/v8:libcxx_rules.bzl", "libcxx_library")
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
config_setting(
|
||||
name = "is_linux",
|
||||
constraint_values = ["@platforms//os:linux"],
|
||||
)
|
||||
|
||||
config_setting(
|
||||
name = "is_macos",
|
||||
constraint_values = ["@platforms//os:macos"],
|
||||
)
|
||||
|
||||
config_setting(
|
||||
name = "is_windows",
|
||||
constraint_values = ["@platforms//os:windows"],
|
||||
)
|
||||
|
||||
LIBCXX_SRCS = [
|
||||
"src/algorithm.cpp",
|
||||
"src/any.cpp",
|
||||
"src/atomic.cpp",
|
||||
"src/barrier.cpp",
|
||||
"src/bind.cpp",
|
||||
"src/call_once.cpp",
|
||||
"src/charconv.cpp",
|
||||
"src/chrono.cpp",
|
||||
"src/condition_variable.cpp",
|
||||
"src/condition_variable_destructor.cpp",
|
||||
"src/error_category.cpp",
|
||||
"src/exception.cpp",
|
||||
"src/filesystem/directory_iterator.cpp",
|
||||
"src/filesystem/filesystem_error.cpp",
|
||||
"src/filesystem/operations.cpp",
|
||||
"src/filesystem/path.cpp",
|
||||
"src/functional.cpp",
|
||||
"src/future.cpp",
|
||||
"src/hash.cpp",
|
||||
"src/ios.cpp",
|
||||
"src/ios.instantiations.cpp",
|
||||
"src/iostream.cpp",
|
||||
"src/locale.cpp",
|
||||
"src/memory.cpp",
|
||||
"src/mutex.cpp",
|
||||
"src/mutex_destructor.cpp",
|
||||
"src/new.cpp",
|
||||
"src/new_handler.cpp",
|
||||
"src/new_helpers.cpp",
|
||||
"src/optional.cpp",
|
||||
"src/random.cpp",
|
||||
"src/random_shuffle.cpp",
|
||||
"src/regex.cpp",
|
||||
"src/ryu/d2fixed.cpp",
|
||||
"src/ryu/d2s.cpp",
|
||||
"src/ryu/f2s.cpp",
|
||||
"src/shared_mutex.cpp",
|
||||
"src/stdexcept.cpp",
|
||||
"src/string.cpp",
|
||||
"src/strstream.cpp",
|
||||
"src/system_error.cpp",
|
||||
"src/thread.cpp",
|
||||
"src/typeinfo.cpp",
|
||||
"src/valarray.cpp",
|
||||
"src/variant.cpp",
|
||||
"src/vector.cpp",
|
||||
"src/verbose_abort.cpp",
|
||||
]
|
||||
|
||||
cc_library(
|
||||
name = "headers",
|
||||
hdrs = glob(["include/**"]),
|
||||
strip_include_prefix = "include",
|
||||
deps = ["@//third_party/v8/libcxx_config:headers"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "internal_headers",
|
||||
hdrs = glob([
|
||||
"src/**/*.h",
|
||||
"src/**/*.ipp",
|
||||
]),
|
||||
includes = ["src"],
|
||||
)
|
||||
|
||||
libcxx_library(
|
||||
name = "libcxx",
|
||||
srcs = LIBCXX_SRCS + select({
|
||||
"@//third_party/v8:use_rusty_v8_custom_libcxx_native_windows": [
|
||||
"src/filesystem/filesystem_clock.cpp",
|
||||
],
|
||||
":is_linux": [
|
||||
"src/filesystem/directory_entry.cpp",
|
||||
"src/filesystem/filesystem_clock.cpp",
|
||||
],
|
||||
"//conditions:default": [],
|
||||
}) + select({
|
||||
":is_windows": [
|
||||
"src/support/win32/locale_win32.cpp",
|
||||
"src/support/win32/support.cpp",
|
||||
"src/support/win32/thread_win32.cpp",
|
||||
],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
copts = select({
|
||||
"@//third_party/v8:use_rusty_v8_custom_libcxx_native_windows": [
|
||||
"/EHsc",
|
||||
"/GR",
|
||||
"/std:c++latest",
|
||||
"/Zc:__cplusplus",
|
||||
"/clang:-fstrict-aliasing",
|
||||
"/clang:-Wno-nullability-completeness",
|
||||
"/clang:-Wno-unused-parameter",
|
||||
"/clang:-Wundef",
|
||||
# libc++ uses the Microsoft exception implementation with /MT.
|
||||
"/clang:-Xclang",
|
||||
"/clang:--dependent-lib=libcpmt",
|
||||
"/wd4005",
|
||||
],
|
||||
"//conditions:default": [
|
||||
"-fexceptions",
|
||||
"-frtti",
|
||||
"-fstrict-aliasing",
|
||||
"-fvisibility=hidden",
|
||||
"-fvisibility-inlines-hidden",
|
||||
"-nostdinc++",
|
||||
"-std=c++23",
|
||||
"-Wno-nullability-completeness",
|
||||
"-Wno-unused-parameter",
|
||||
"-Wundef",
|
||||
],
|
||||
}) + select({
|
||||
"@//third_party/v8:use_rusty_v8_custom_libcxx_native_windows": [],
|
||||
":is_windows": ["-Wno-macro-redefined"],
|
||||
"//conditions:default": ["-fPIC"],
|
||||
}) + select({
|
||||
":is_macos": [
|
||||
"-Wno-pragma-clang-attribute",
|
||||
"-Wno-thread-safety-analysis",
|
||||
],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
defines = [
|
||||
"CR_LIBCXX_REVISION=b16984ce99c702355a5b2b4c52574e82cec41fb9",
|
||||
"LIBC_NAMESPACE=__llvm_libc_cr",
|
||||
"_LIBCPP_BUILDING_LIBRARY",
|
||||
"_LIBCPP_CONSTINIT=constinit",
|
||||
"_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
|
||||
"_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE",
|
||||
"_LIBCPP_INSTRUMENTED_WITH_ASAN=0",
|
||||
] + select({
|
||||
# The Windows build uses the Microsoft ABI, never Itanium libc++abi.
|
||||
"@//third_party/v8:use_rusty_v8_custom_libcxx_native_windows": [],
|
||||
"//conditions:default": [
|
||||
"LIBCXX_BUILDING_LIBCXXABI",
|
||||
"_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
|
||||
],
|
||||
}) + select({
|
||||
"@llvm//platforms/config:musl": [
|
||||
# Chromium's checked-in __config_site uses this switch to enable
|
||||
# libc++'s musl-specific configuration.
|
||||
"ANDROID_HOST_MUSL",
|
||||
],
|
||||
"//conditions:default": [],
|
||||
}) + select({
|
||||
"@//third_party/v8:use_rusty_v8_custom_libcxx_native_windows": [],
|
||||
":is_windows": [
|
||||
"NTDDI_VERSION=NTDDI_WIN7",
|
||||
"WINVER=_WIN32_WINNT_WIN7",
|
||||
"_WIN32_WINNT=_WIN32_WINNT_WIN7",
|
||||
],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
implementation_deps = [
|
||||
":headers",
|
||||
":internal_headers",
|
||||
"@rusty_v8_llvm_libc//:headers",
|
||||
] + select({
|
||||
"@//third_party/v8:use_rusty_v8_custom_libcxx_native_windows": [],
|
||||
"//conditions:default": ["@rusty_v8_libcxxabi//:headers"],
|
||||
}) + select({
|
||||
":is_linux": [
|
||||
"@@llvm++kernel_headers+kernel_headers//:kernel_headers",
|
||||
],
|
||||
"//conditions:default": [],
|
||||
}) + select({
|
||||
"@llvm//platforms/config:gnu": [
|
||||
"@@llvm++glibc+glibc//:gnu_libc_headers",
|
||||
],
|
||||
"@llvm//platforms/config:musl": [
|
||||
"@@llvm++musl+musl_libc//:musl_libc_headers",
|
||||
],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
includes = ["src"],
|
||||
local_defines = select({
|
||||
"@//third_party/v8:use_rusty_v8_custom_libcxx_native_windows": [
|
||||
"NTDDI_VERSION=NTDDI_WIN7",
|
||||
"WINVER=_WIN32_WINNT_WIN7",
|
||||
"_WIN32_WINNT=_WIN32_WINNT_WIN7",
|
||||
],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
)
|
||||
Reference in New Issue
Block a user