[llvm] [Bazel] Fixes 89894b6 (PR #194321)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 27 02:13:55 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: forking-google-bazel-bot[bot]
<details>
<summary>Changes</summary>
This fixes 89894b67484694aeaaec9c6bac6a09d71c347e6f.
---
Full diff: https://github.com/llvm/llvm-project/pull/194321.diff
2 Files Affected:
- (modified) utils/bazel/llvm-project-overlay/libc/BUILD.bazel (+60)
- (modified) utils/bazel/llvm-project-overlay/libc/test/src/sys/socket/BUILD.bazel (+6)
``````````diff
diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
index 1be54084b85bc..e09828d682d98 100644
--- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
@@ -366,11 +366,27 @@ libc_support_library(
deps = [":llvm_libc_macros_complex_macros"],
)
+libc_support_library(
+ name = "llvm_libc_types_struct_cmsghdr",
+ hdrs = ["include/llvm-libc-types/struct_cmsghdr.h"],
+ deps = [
+ ":llvm_libc_types_size_t",
+ ],
+)
+
libc_support_library(
name = "llvm_libc_macros_fcntl_macros",
hdrs = ["include/llvm-libc-macros/linux/fcntl-macros.h"],
)
+libc_support_library(
+ name = "llvm_libc_macros_sys_socket_macros",
+ hdrs = [
+ "include/llvm-libc-macros/linux/sys-socket-macros.h",
+ "include/llvm-libc-macros/sys-socket-macros.h",
+ ],
+)
+
libc_support_library(
name = "llvm_libc_types_size_t",
hdrs = ["include/llvm-libc-types/size_t.h"],
@@ -414,6 +430,14 @@ libc_support_library(
hdrs = ["hdr/sys_epoll_macros.h"],
)
+libc_support_library(
+ name = "hdr_sys_socket_macros",
+ hdrs = ["hdr/sys_socket_macros.h"],
+ deps = [
+ ":llvm_libc_macros_sys_socket_macros",
+ ],
+)
+
libc_support_library(
name = "hdr_errno_macros",
hdrs = ["hdr/errno_macros.h"],
@@ -675,6 +699,12 @@ libc_support_library(
hdrs = ["hdr/types/struct_msghdr.h"],
)
+libc_support_library(
+ name = "types_struct_cmsghdr",
+ hdrs = ["hdr/types/struct_cmsghdr.h"],
+ deps = [":llvm_libc_types_struct_cmsghdr"],
+)
+
libc_support_library(
name = "types_wchar_t",
hdrs = ["hdr/types/wchar_t.h"],
@@ -2006,6 +2036,22 @@ libc_support_library(
],
)
+libc_support_library(
+ name = "__support_osutil_linux_syscall_wrappers_getsockopt",
+ hdrs = ["src/__support/OSUtil/linux/syscall_wrappers/getsockopt.h"],
+ target_compatible_with = select({
+ "@platforms//os:linux": [],
+ "//conditions:default": ["@platforms//:incompatible"],
+ }),
+ deps = [
+ ":__support_common",
+ ":__support_error_or",
+ ":__support_macros_config",
+ ":__support_osutil_syscall",
+ ":types_socklen_t",
+ ],
+)
+
libc_support_library(
name = "__support_osutil_linux_syscall_wrappers_getrandom",
hdrs = ["src/__support/OSUtil/linux/syscall_wrappers/getrandom.h"],
@@ -11949,6 +11995,20 @@ libc_function(
],
)
+libc_function(
+ name = "getsockopt",
+ srcs = ["src/sys/socket/linux/getsockopt.cpp"],
+ hdrs = ["src/sys/socket/getsockopt.h"],
+ deps = [
+ ":__support_common",
+ ":__support_libc_errno",
+ ":__support_macros_config",
+ ":__support_osutil_linux_syscall_wrappers_getsockopt",
+ ":errno",
+ ":types_socklen_t",
+ ],
+)
+
libc_function(
name = "recv",
srcs = ["src/sys/socket/linux/recv.cpp"],
diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/sys/socket/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/sys/socket/BUILD.bazel
index c73fde124927d..52fbbb8a13a6e 100644
--- a/utils/bazel/llvm-project-overlay/libc/test/src/sys/socket/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/test/src/sys/socket/BUILD.bazel
@@ -55,8 +55,14 @@ libc_test(
srcs = ["linux/sendmsg_recvmsg_test.cpp"],
deps = [
"//libc:close",
+ "//libc:getsockopt",
+ "//libc:hdr_sys_socket_macros",
+ "//libc:llvm_libc_macros_sys_socket_macros",
+ "//libc:memcpy",
+ "//libc:memset",
"//libc:recvmsg",
"//libc:sendmsg",
"//libc:socketpair",
+ "//libc:types_struct_cmsghdr",
],
)
``````````
</details>
https://github.com/llvm/llvm-project/pull/194321
More information about the llvm-commits
mailing list