[clang] [clang] [unittest] Fix linking against dylib (PR #175317)
Michał Górny via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 10 07:29:25 PST 2026
https://github.com/mgorny created https://github.com/llvm/llvm-project/pull/175317
Fix a regression introduced in #174513 that would cause `BasicTests` to link directly to static `LLVMTargetParser` library instead of using the component linking, to respect dylib.
>From c2ed6441c2c6483bd38f23923547cf369b3dbd43 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny at gentoo.org>
Date: Sat, 10 Jan 2026 16:22:54 +0100
Subject: [PATCH] [clang] [unittest] Fix linking against dylib
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fix a regression introduced in #174513 that would cause `BasicTests` to
link directly to static `LLVMTargetParser` library instead of using the
component linking, to respect dylib.
Signed-off-by: Michał Górny <mgorny at gentoo.org>
---
clang/unittests/Basic/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/unittests/Basic/CMakeLists.txt b/clang/unittests/Basic/CMakeLists.txt
index 4918d07ace22b..058243fd3fdba 100644
--- a/clang/unittests/Basic/CMakeLists.txt
+++ b/clang/unittests/Basic/CMakeLists.txt
@@ -16,8 +16,8 @@ add_distinct_clang_unittest(BasicTests
clangBasic
clangLex
LINK_LIBS
- LLVMTargetParser
LLVMTestingSupport
LLVM_COMPONENTS
Support
+ TargetParser
)
More information about the cfe-commits
mailing list