From db2315afa8db1153e3b85d452cd14d5a1b957350 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Tue, 29 Apr 2025 06:32:03 -0700 Subject: [clang] Merge gtest binaries into AllClangUnitTests (#134196) This reduces the size of the clang/unittests build directory by 64% and my overall build dir size by 5%. Static linking is the real driving factor here, but even if the default build configuration used shared libraries, I don't see why we should be building so many unit test binaries. To make the project more approachable for new contributors, I'm attempting to make the build a bit less resource-intensive. Build directory size is a common complaint, and this is low-hanging fruit. I've noticed that incremental builds leave behind the old, stale gtest binaries, and lit will keep running them. This mostly doesn't matter unless they use shared libraries, which will eventually stop working after successive builds. You can clean up the old test binaries with this command in the build directory: $ find tools/clang/unittests/ -iname '*Tests' -type f | xargs rm ... or you can simply clean the build directory in a more holistic way. --------- Co-authored-by: Petr Hosek --- clang/unittests/Driver/ModuleCacheTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/unittests/Driver/ModuleCacheTest.cpp') diff --git a/clang/unittests/Driver/ModuleCacheTest.cpp b/clang/unittests/Driver/ModuleCacheTest.cpp index 4874441..7aa5047 100644 --- a/clang/unittests/Driver/ModuleCacheTest.cpp +++ b/clang/unittests/Driver/ModuleCacheTest.cpp @@ -17,7 +17,7 @@ using namespace clang::driver; namespace { -TEST(ModuleCacheTest, GetTargetAndMode) { +TEST(DriverModuleCacheTest, GetTargetAndMode) { SmallString<128> Buf; Driver::getDefaultModuleCachePath(Buf); StringRef Path = Buf; -- cgit v1.1