Skip to content
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

[libc] add mempcpy to bazel overlay #75383

Merged
merged 1 commit into from
Dec 13, 2023

Conversation

nickdesaulniers
Copy link
Member

We'd like to begin overlaying mempcpy.

We'd like to begin overlaying mempcpy.
@llvmbot
Copy link
Collaborator

llvmbot commented Dec 13, 2023

@llvm/pr-subscribers-libc

Author: Nick Desaulniers (nickdesaulniers)

Changes

We'd like to begin overlaying mempcpy.


Full diff: https://github.com/llvm/llvm-project/pull/75383.diff

2 Files Affected:

  • (modified) utils/bazel/llvm-project-overlay/libc/BUILD.bazel (+13)
  • (modified) utils/bazel/llvm-project-overlay/libc/test/src/string/BUILD.bazel (+8)
diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
index b9bdb8f7c6d3eb..d4f2c078db79d9 100644
--- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
@@ -2274,6 +2274,19 @@ libc_function(
     ],
 )
 
+libc_function(
+    name = "mempcpy",
+    srcs = ["src/string/mempcpy.cpp"],
+    hdrs = ["src/string/mempcpy.h"],
+    copts = ["-mllvm --tail-merge-threshold=0"],
+    features = no_sanitize_features,
+    weak = True,
+    deps = [
+        ":__support_common",
+        ":string_memory_utils",
+    ],
+)
+
 libc_function(
     name = "bcopy",
     srcs = ["src/string/bcopy.cpp"],
diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/string/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/string/BUILD.bazel
index 723c0735b1a375..d96f390c0c3804 100644
--- a/utils/bazel/llvm-project-overlay/libc/test/src/string/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/test/src/string/BUILD.bazel
@@ -135,6 +135,14 @@ libc_test(
     deps = [":memory_check_utils"],
 )
 
+libc_test(
+    name = "mempcpy_test",
+    srcs = ["mempcpy_test.cpp"],
+    libc_function_deps = [
+        "//libc:mempcpy",
+    ],
+)
+
 libc_test(
     name = "memset_test",
     srcs = ["memset_test.cpp"],

@nickdesaulniers nickdesaulniers merged commit 1f6427a into llvm:main Dec 13, 2023
5 checks passed
@nickdesaulniers nickdesaulniers deleted the uprev_bazel branch December 13, 2023 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants