Skip to content

Commit 3d025d2

Browse files
[bazel] fix libc build
Link: #118899
1 parent 0469bb9 commit 3d025d2

File tree

3 files changed

+66
-40
lines changed

3 files changed

+66
-40
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3708,8 +3708,8 @@ libc_function(
37083708

37093709
libc_function(
37103710
name = "bcopy",
3711-
srcs = ["src/string/bcopy.cpp"],
3712-
hdrs = ["src/string/bcopy.h"],
3711+
srcs = ["src/strings/bcopy.cpp"],
3712+
hdrs = ["src/strings/bcopy.h"],
37133713
features = no_sanitize_features,
37143714
deps = [
37153715
":__support_common",
@@ -3732,8 +3732,8 @@ libc_function(
37323732

37333733
libc_function(
37343734
name = "bcmp",
3735-
srcs = ["src/string/bcmp.cpp"],
3736-
hdrs = ["src/string/bcmp.h"],
3735+
srcs = ["src/strings/bcmp.cpp"],
3736+
hdrs = ["src/strings/bcmp.h"],
37373737
features = no_sanitize_features,
37383738
weak = True,
37393739
deps = [
@@ -3744,8 +3744,8 @@ libc_function(
37443744

37453745
libc_function(
37463746
name = "bzero",
3747-
srcs = ["src/string/bzero.cpp"],
3748-
hdrs = ["src/string/bzero.h"],
3747+
srcs = ["src/strings/bzero.cpp"],
3748+
hdrs = ["src/strings/bzero.h"],
37493749
features = no_sanitize_features,
37503750
weak = True,
37513751
deps = [

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

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -184,19 +184,6 @@ libc_test(
184184
],
185185
)
186186

187-
libc_test(
188-
name = "bcopy_test",
189-
srcs = ["bcopy_test.cpp"],
190-
libc_function_deps = [
191-
"//libc:bcopy",
192-
],
193-
deps = [
194-
":memory_check_utils",
195-
"//libc:__support_cpp_span",
196-
"//libc/test/UnitTest:memory_matcher",
197-
],
198-
)
199-
200187
libc_test(
201188
name = "memcmp_test",
202189
srcs = ["memcmp_test.cpp"],
@@ -208,24 +195,3 @@ libc_test(
208195
"//libc/test/UnitTest:test_logger",
209196
],
210197
)
211-
212-
libc_test(
213-
name = "bcmp_test",
214-
srcs = ["bcmp_test.cpp"],
215-
libc_function_deps = [
216-
"//libc:bcmp",
217-
],
218-
deps = [
219-
":memory_check_utils",
220-
"//libc/test/UnitTest:test_logger",
221-
],
222-
)
223-
224-
libc_test(
225-
name = "bzero_test",
226-
srcs = ["bzero_test.cpp"],
227-
libc_function_deps = [
228-
"//libc:bzero",
229-
],
230-
deps = [":memory_check_utils"],
231-
)
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# This file is licensed under the Apache License v2.0 with LLVM Exceptions.
2+
# See https://llvm.org/LICENSE.txt for license information.
3+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4+
5+
# Tests for LLVM libc string.h functions.
6+
7+
load("//libc:libc_build_rules.bzl", "libc_support_library")
8+
load("//libc/test:libc_test_rules.bzl", "libc_test")
9+
10+
package(default_visibility = ["//visibility:public"])
11+
12+
licenses(["notice"])
13+
14+
# libc_support_library(
15+
# name = "memory_check_utils",
16+
# hdrs = ["memory_utils/memory_check_utils.h"],
17+
# deps = [
18+
# "//libc:__support_cpp_span",
19+
# "//libc:__support_libc_assert",
20+
# "//libc:__support_macros_config",
21+
# "//libc:__support_macros_sanitizer",
22+
# "//libc:string_memory_utils",
23+
# ],
24+
# )
25+
26+
libc_test(
27+
name = "bcopy_test",
28+
srcs = ["bcopy_test.cpp"],
29+
libc_function_deps = [
30+
"//libc:bcopy",
31+
],
32+
deps = [
33+
"//libc/test/string:memory_check_utils",
34+
"//libc:__support_cpp_span",
35+
"//libc/test/UnitTest:memory_matcher",
36+
],
37+
)
38+
39+
libc_test(
40+
name = "bcmp_test",
41+
srcs = ["bcmp_test.cpp"],
42+
libc_function_deps = [
43+
"//libc:bcmp",
44+
],
45+
deps = [
46+
"//libc/test/string:memory_check_utils",
47+
"//libc/test/UnitTest:test_logger",
48+
],
49+
)
50+
51+
libc_test(
52+
name = "bzero_test",
53+
srcs = ["bzero_test.cpp"],
54+
libc_function_deps = [
55+
"//libc:bzero",
56+
],
57+
deps = [
58+
"//libc/test/string:memory_check_utils",
59+
],
60+
)

0 commit comments

Comments
 (0)