Skip to content

[libc][bazel] Minor cleanup to remove unused dependencies. #130348

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 1 commit into from
Mar 7, 2025

Conversation

vonosmas
Copy link
Contributor

@vonosmas vonosmas commented Mar 7, 2025

  • strcpy doesn't need to depend on memcpy
  • qsort_test_helper has been generalized and doesn't need to depend on qsort.

This is a small cleanup to unblock the work outlined in #130327.

* strcpy doesn't need to depend on memcpy
* qsort_test_helper has been generalized and doesn't need to depend on
  qsort.

This is a small cleanup to unblock the work outlined in llvm#130327.
@llvmbot llvmbot added libc bazel "Peripheral" support tier build system: utils/bazel labels Mar 7, 2025
@llvmbot
Copy link
Member

llvmbot commented Mar 7, 2025

@llvm/pr-subscribers-libc

Author: Alexey Samsonov (vonosmas)

Changes
  • strcpy doesn't need to depend on memcpy
  • qsort_test_helper has been generalized and doesn't need to depend on qsort.

This is a small cleanup to unblock the work outlined in #130327.


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

3 Files Affected:

  • (modified) libc/test/src/stdlib/SortingTest.h (-1)
  • (modified) utils/bazel/llvm-project-overlay/libc/BUILD.bazel (-1)
  • (modified) utils/bazel/llvm-project-overlay/libc/test/src/stdlib/BUILD.bazel (-1)
diff --git a/libc/test/src/stdlib/SortingTest.h b/libc/test/src/stdlib/SortingTest.h
index 681a420ea7274..d845280aaa27e 100644
--- a/libc/test/src/stdlib/SortingTest.h
+++ b/libc/test/src/stdlib/SortingTest.h
@@ -7,7 +7,6 @@
 //===----------------------------------------------------------------------===//
 
 #include "src/__support/macros/config.h"
-#include "src/stdlib/qsort.h"
 #include "test/UnitTest/Test.h"
 
 class SortingTest : public LIBC_NAMESPACE::testing::Test {
diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
index 4b0fec6473b67..61de1aa7f2abe 100644
--- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
@@ -4270,7 +4270,6 @@ libc_function(
     hdrs = ["src/string/strcpy.h"],
     deps = [
         ":__support_common",
-        ":memcpy",
         ":string_memory_utils",
         ":string_utils",
     ],
diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/stdlib/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/stdlib/BUILD.bazel
index 73685ede41e85..7d9ff25ae69e4 100644
--- a/utils/bazel/llvm-project-overlay/libc/test/src/stdlib/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/test/src/stdlib/BUILD.bazel
@@ -115,7 +115,6 @@ libc_support_library(
     hdrs = ["SortingTest.h"],
     deps = [
         "//libc:__support_macros_config",
-        "//libc:qsort",
         "//libc/test/UnitTest:LibcUnitTest",
     ],
 )

@vonosmas vonosmas merged commit d90423e into llvm:main Mar 7, 2025
16 of 18 checks passed
@vonosmas vonosmas deleted the bazel-refactor branch March 7, 2025 21:31
jph-13 pushed a commit to jph-13/llvm-project that referenced this pull request Mar 21, 2025
* strcpy doesn't need to depend on memcpy
* qsort_test_helper has been generalized and doesn't need to depend on
qsort.

This is a small cleanup to unblock the work outlined in llvm#130327.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bazel "Peripheral" support tier build system: utils/bazel libc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants