aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorHaojian Wu <hokein.wu@gmail.com>2024-06-03 09:22:25 +0200
committerHaojian Wu <hokein.wu@gmail.com>2024-06-03 09:23:28 +0200
commit12c85cd31088f64a1afbc5b2133dde2e1d2516d3 (patch)
tree9eb29440e26e34106c0ed3e5fdd7fd1a7a2c8084 /utils
parentef4c91c44311f96f174609219e126011ec085d1f (diff)
downloadllvm-12c85cd31088f64a1afbc5b2133dde2e1d2516d3.zip
llvm-12c85cd31088f64a1afbc5b2133dde2e1d2516d3.tar.gz
llvm-12c85cd31088f64a1afbc5b2133dde2e1d2516d3.tar.bz2
[bazel]: port for the libc change 142afde0eba4940f2b331274e9a3535fee960f35
Diffstat (limited to 'utils')
-rw-r--r--utils/bazel/llvm-project-overlay/libc/BUILD.bazel34
1 files changed, 34 insertions, 0 deletions
diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
index 1f7a2f8..30044f8 100644
--- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
@@ -174,6 +174,11 @@ libc_support_library(
hdrs = ["hdr/types/time_t.h"],
)
+libc_support_library(
+ name = "types_pid_t",
+ hdrs = ["hdr/types/pid_t.h"],
+)
+
############################### Support libraries ##############################
libc_support_library(
@@ -1147,6 +1152,33 @@ libc_support_library(
)
libc_support_library(
+ name = "__support_threads_sleep",
+ hdrs = ["src/__support/threads/sleep.h"],
+)
+
+libc_support_library(
+ name = "__support_threads_raw_mutex",
+ hdrs = [
+ "src/__support/threads/linux/raw_mutex.h",
+ ],
+ defines = [
+ "LIBC_COPT_TIMEOUT_ENSURE_MONOTONICITY",
+ "LIBC_COPT_RAW_MUTEX_DEFAULT_SPIN_COUNT"
+ ],
+ target_compatible_with = select({
+ "@platforms//os:linux": [],
+ "//conditions:default": ["@platforms//:incompatible"],
+ }),
+ deps = [
+ ":__support_cpp_optional",
+ ":__support_time_linux",
+ ":__support_threads_linux_futex_utils",
+ ":__support_threads_sleep",
+ ":types_pid_t",
+ ],
+)
+
+libc_support_library(
name = "__support_threads_mutex",
hdrs = [
"src/__support/threads/mutex.h",
@@ -1163,6 +1195,8 @@ libc_support_library(
":__support_cpp_atomic",
":__support_osutil_syscall",
":__support_threads_linux_futex_utils",
+ ":__support_threads_raw_mutex",
+ ":types_pid_t",
],
)