Skip to content

Commit 11e5e22

Browse files
[libc][bazel] mark read and write as weak (llvm#81330)
Downstream there's a user that intercepts these functions and overlays them. This causes symbol conflicts if neither function is marked weak. In future the intent is to move to this to being a downstream configuration option.
1 parent c2b01c8 commit 11e5e22

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2803,6 +2803,7 @@ libc_function(
28032803
name = "read",
28042804
srcs = ["src/unistd/linux/read.cpp"],
28052805
hdrs = ["src/unistd/read.h"],
2806+
weak = True,
28062807
deps = [
28072808
":__support_common",
28082809
":__support_macros_sanitizer",
@@ -2928,6 +2929,7 @@ libc_function(
29282929
name = "write",
29292930
srcs = ["src/unistd/linux/write.cpp"],
29302931
hdrs = ["src/unistd/write.h"],
2932+
weak = True,
29312933
deps = [
29322934
":__support_common",
29332935
":__support_osutil_syscall",

0 commit comments

Comments
 (0)