Skip to content

Commit 22cc448

Browse files
committed
[bazel] Port libc llvm#91905
1 parent 4420ea7 commit 22cc448

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

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

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,11 @@ libc_support_library(
122122
hdrs = ["hdr/errno_macros.h"],
123123
)
124124

125+
libc_support_library(
126+
name = "hdr_time_macros",
127+
hdrs = ["hdr/time_macros.h"],
128+
)
129+
125130
############################ Type Proxy Header Files ###########################
126131

127132
libc_support_library(
@@ -149,6 +154,11 @@ libc_support_library(
149154
hdrs = ["hdr/types/struct_timespec.h"],
150155
)
151156

157+
libc_support_library(
158+
name = "types_time_t",
159+
hdrs = ["hdr/types/time_t.h"],
160+
)
161+
152162
############################### Support libraries ##############################
153163

154164
libc_support_library(
@@ -1115,6 +1125,7 @@ libc_support_library(
11151125
":__support_cpp_optional",
11161126
":__support_osutil_syscall",
11171127
":__support_threads_linux_futex_word_type",
1128+
":__support_time_linux",
11181129
":types_struct_timespec",
11191130
],
11201131
)
@@ -1139,6 +1150,28 @@ libc_support_library(
11391150
],
11401151
)
11411152

1153+
libc_support_library(
1154+
name = "__support_time",
1155+
hdrs = glob(["src/__support/time/*.h"]),
1156+
deps = [
1157+
":hdr_time_macros",
1158+
":types_time_t",
1159+
],
1160+
)
1161+
1162+
libc_support_library(
1163+
name = "__support_time_linux",
1164+
hdrs = glob(["src/__support/time/linux/**/*.h"]),
1165+
target_compatible_with = select({
1166+
"@platforms//os:linux": [],
1167+
"//conditions:default": ["@platforms//:incompatible"],
1168+
}),
1169+
deps = [
1170+
":__support_time",
1171+
":hdr_time_macros",
1172+
],
1173+
)
1174+
11421175
############################### errno targets ################################
11431176

11441177
libc_function(

0 commit comments

Comments
 (0)