Skip to content

[bazel] fix libc build #119433

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions utils/bazel/llvm-project-overlay/libc/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3708,8 +3708,8 @@ libc_function(

libc_function(
name = "bcopy",
srcs = ["src/string/bcopy.cpp"],
hdrs = ["src/string/bcopy.h"],
srcs = ["src/strings/bcopy.cpp"],
hdrs = ["src/strings/bcopy.h"],
features = no_sanitize_features,
deps = [
":__support_common",
Expand All @@ -3732,8 +3732,8 @@ libc_function(

libc_function(
name = "bcmp",
srcs = ["src/string/bcmp.cpp"],
hdrs = ["src/string/bcmp.h"],
srcs = ["src/strings/bcmp.cpp"],
hdrs = ["src/strings/bcmp.h"],
features = no_sanitize_features,
weak = True,
deps = [
Expand All @@ -3744,8 +3744,8 @@ libc_function(

libc_function(
name = "bzero",
srcs = ["src/string/bzero.cpp"],
hdrs = ["src/string/bzero.h"],
srcs = ["src/strings/bzero.cpp"],
hdrs = ["src/strings/bzero.h"],
features = no_sanitize_features,
weak = True,
deps = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,19 +184,6 @@ libc_test(
],
)

libc_test(
name = "bcopy_test",
srcs = ["bcopy_test.cpp"],
libc_function_deps = [
"//libc:bcopy",
],
deps = [
":memory_check_utils",
"//libc:__support_cpp_span",
"//libc/test/UnitTest:memory_matcher",
],
)

libc_test(
name = "memcmp_test",
srcs = ["memcmp_test.cpp"],
Expand All @@ -208,24 +195,3 @@ libc_test(
"//libc/test/UnitTest:test_logger",
],
)

libc_test(
name = "bcmp_test",
srcs = ["bcmp_test.cpp"],
libc_function_deps = [
"//libc:bcmp",
],
deps = [
":memory_check_utils",
"//libc/test/UnitTest:test_logger",
],
)

libc_test(
name = "bzero_test",
srcs = ["bzero_test.cpp"],
libc_function_deps = [
"//libc:bzero",
],
deps = [":memory_check_utils"],
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# This file is licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

# Tests for LLVM libc string.h functions.

load("//libc:libc_build_rules.bzl", "libc_support_library")
load("//libc/test:libc_test_rules.bzl", "libc_test")

package(default_visibility = ["//visibility:public"])

licenses(["notice"])

libc_test(
name = "bcopy_test",
srcs = ["bcopy_test.cpp"],
libc_function_deps = [
"//libc:bcopy",
],
deps = [
"//libc:__support_cpp_span",
"//libc/test/UnitTest:memory_matcher",
"//libc/test/src/string:memory_check_utils",
],
)

libc_test(
name = "bcmp_test",
srcs = ["bcmp_test.cpp"],
libc_function_deps = [
"//libc:bcmp",
],
deps = [
"//libc/test/UnitTest:test_logger",
"//libc/test/src/string:memory_check_utils",
],
)

libc_test(
name = "bzero_test",
srcs = ["bzero_test.cpp"],
libc_function_deps = [
"//libc:bzero",
],
deps = [
"//libc/test/src/string:memory_check_utils",
],
)
Loading