Skip to content

Commit 4618b67

Browse files
[libc][bazel] Enable epoll_pwait2 on bazel (#108254)
The wrapper for epoll_pwait2 has been difficult to enable since it requires a very new version of the linux kernel (5.11). On cmake we still need to create a mechanism to check if we can build it, but our current bazel users are all on a new enough kernel version we can just enable it.
1 parent ec7c8cd commit 4618b67

File tree

2 files changed

+36
-40
lines changed

2 files changed

+36
-40
lines changed

utils/bazel/llvm-project-overlay/libc/BUILD.bazel

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4137,25 +4137,23 @@ libc_function(
41374137
],
41384138
)
41394139

4140-
#TODO: Enable once epoll_pwait2 availablilty can be checked first.
4141-
# https://github.com/llvm/llvm-project/issues/80060
4142-
# libc_function(
4143-
# name = "epoll_pwait2",
4144-
# srcs = ["src/sys/epoll/linux/epoll_pwait2.cpp"],
4145-
# hdrs = ["src/sys/epoll/epoll_pwait2.h"],
4146-
# target_compatible_with = select({
4147-
# "@platforms//os:linux": [],
4148-
# "//conditions:default": ["@platforms//:incompatible"],
4149-
# }),
4150-
# weak = True,
4151-
# deps = [
4152-
# ":__support_macros_sanitizer",
4153-
# ":__support_osutil_syscall",
4154-
# ":errno",
4155-
# ":hdr_signal_macros",
4156-
# ":hdr_sys_epoll_macros",
4157-
# ":types_sigset_t",
4158-
# ":types_struct_epoll_event",
4159-
# ":types_struct_timespec",
4160-
# ],
4161-
# )
4140+
libc_function(
4141+
name = "epoll_pwait2",
4142+
srcs = ["src/sys/epoll/linux/epoll_pwait2.cpp"],
4143+
hdrs = ["src/sys/epoll/epoll_pwait2.h"],
4144+
target_compatible_with = select({
4145+
"@platforms//os:linux": [],
4146+
"//conditions:default": ["@platforms//:incompatible"],
4147+
}),
4148+
weak = True,
4149+
deps = [
4150+
":__support_macros_sanitizer",
4151+
":__support_osutil_syscall",
4152+
":errno",
4153+
":hdr_signal_macros",
4154+
":hdr_sys_epoll_macros",
4155+
":types_sigset_t",
4156+
":types_struct_epoll_event",
4157+
":types_struct_timespec",
4158+
],
4159+
)

utils/bazel/llvm-project-overlay/libc/test/src/sys/epoll/BUILD.bazel

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -78,21 +78,19 @@ libc_test(
7878
],
7979
)
8080

81-
#TODO: Enable once epoll_pwait2 availablilty can be checked first.
82-
# https://github.com/llvm/llvm-project/issues/80060
83-
# libc_test(
84-
# name = "epoll_pwait2_test",
85-
# srcs = ["linux/epoll_pwait2_test.cpp"],
86-
# libc_function_deps = [
87-
# "//libc:epoll_pwait2",
88-
# "//libc:epoll_create1",
89-
# "//libc:epoll_ctl",
90-
# "//libc:pipe",
91-
# "//libc:close",
92-
# ],
93-
# deps = [
94-
# "//libc:hdr_sys_epoll_macros",
95-
# "//libc:types_struct_epoll_event",
96-
# "//libc:types_struct_timespec",
97-
# ],
98-
# )
81+
libc_test(
82+
name = "epoll_pwait2_test",
83+
srcs = ["linux/epoll_pwait2_test.cpp"],
84+
libc_function_deps = [
85+
"//libc:epoll_pwait2",
86+
"//libc:epoll_create1",
87+
"//libc:epoll_ctl",
88+
"//libc:pipe",
89+
"//libc:close",
90+
],
91+
deps = [
92+
"//libc:hdr_sys_epoll_macros",
93+
"//libc:types_struct_epoll_event",
94+
"//libc:types_struct_timespec",
95+
],
96+
)

0 commit comments

Comments
 (0)