[llvm-branch-commits] [llvm] [bazel][libc][test] Allow LLVM-libc tests to be run in full-build mode (PR #219262)

Pavel Labath via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Sep 16 01:52:37 PDT 2026


================
@@ -13,37 +13,43 @@ When performing tests we make sure to always use the internal version.
 """
 
 load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
-load("//libc:libc_build_rules.bzl", "libc_common_copts")
+load("//libc:libc_build_rules.bzl", "libc_common_copts", "libc_common_deps")
 load("//libc:libc_configure_options.bzl", "LIBC_CONFIGURE_OPTIONS")
 
-_FULL_BUILD_COPTS = [
-    "-nostdlib++",
-    "-nostdlib",
-    "-DLIBC_FULL_BUILD",
-    "-DLIBC_COPT_USE_C_ASSERT",
-]
-
-_TEST_DEFINES = ["LIBC_TEST_SUBPROCESS_TESTS=1"]
+_TEST_DEFINES = [
+    "LIBC_TEST_SUBPROCESS_TESTS=1",
+] + select({
+    "//libc:full_build": [
+        "TARGET_SUPPORTS_CLOCK",
----------------
labath wrote:

If I'm not mistaken, the cmake build defines this for the overlay build as well (*). This kinda makes sense, if you want to limit the blast radius of this PR, though it would be nice to follow it up with a patch to enable it everywhere.

(*) Technically it's conditional on the `clock` entry point being available, but I don't think that's something we can replicate in bazel, but the entry point should be available for all targets supported by the bazel build...

https://github.com/llvm/llvm-project/pull/219262


More information about the llvm-branch-commits mailing list