https://github.com/teresajohnson created 
https://github.com/llvm/llvm-project/pull/182304

I noticed a couple of tests leave behind copies of clang binaries they
copy into their temp directories. Replicate the cleanup from another
test (clang/test/Driver/clang_f_opts_withspaces.c) to remove these.


>From a060376adadb42811369a6e574a733c86460cc47 Mon Sep 17 00:00:00 2001
From: Teresa Johnson <[email protected]>
Date: Thu, 19 Feb 2026 07:39:12 -0800
Subject: [PATCH] [clang] Clean up large clang binaries copied into test temp
 directories

I noticed a couple of tests leave behind copies of clang binaries they
copy into their temp directories. Replicate the cleanup from another
test (clang/test/Driver/clang_f_opts_withspaces.c) to remove these.
---
 clang/test/Driver/darwin-header-search-libcxx-2.cpp | 3 +++
 clang/test/Driver/rocm-detect-lib-llvm.hip          | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/clang/test/Driver/darwin-header-search-libcxx-2.cpp 
b/clang/test/Driver/darwin-header-search-libcxx-2.cpp
index 055b653614dab..5a690426373b6 100644
--- a/clang/test/Driver/darwin-header-search-libcxx-2.cpp
+++ b/clang/test/Driver/darwin-header-search-libcxx-2.cpp
@@ -62,3 +62,6 @@
 // RUN:               -DSYSROOT=%S/Inputs/basic_darwin_sdk_no_libcxx \
 // RUN:               --check-prefix=CHECK-TOOLCHAIN-NO-SYSROOT %s
 // CHECK-TOOLCHAIN-NO-SYSROOT: "-internal-isystem" 
"[[TOOLCHAIN]]/bin/../include/c++/v1"
+
+// Clean up copy of large binary copied into temp directory to avoid bloat.
+// RUN: rm -f %t/install/bin/clang || true
diff --git a/clang/test/Driver/rocm-detect-lib-llvm.hip 
b/clang/test/Driver/rocm-detect-lib-llvm.hip
index 85bbe78752df2..cfea22bc04f00 100644
--- a/clang/test/Driver/rocm-detect-lib-llvm.hip
+++ b/clang/test/Driver/rocm-detect-lib-llvm.hip
@@ -26,3 +26,6 @@
 //
 // ROCM-LIB-LLVM: ROCm installation search path: {{.*sysroot/opt/rocm$}}
 // ROCM-LIB-LLVM-NOT: ROCm installation search path: 
{{.*sysroot/opt/rocm/lib$}}
+
+// Clean up copy of large binary copied into temp directory to avoid bloat.
+// RUN: rm -f %t/sysroot/opt/rocm/lib/llvm/bin/clang || true

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to