Skip to content

Commit

Permalink
[bazel]: port for the libc change 142afde
Browse files Browse the repository at this point in the history
  • Loading branch information
hokein committed Jun 3, 2024
1 parent ef4c91c commit 12c85cd
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions utils/bazel/llvm-project-overlay/libc/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -1146,6 +1151,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 = [
Expand All @@ -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",
],
)

Expand Down

0 comments on commit 12c85cd

Please sign in to comment.