[clang] [Clang] Update Interpreter tests to use clang_target_link_libraries (PR #110154)

Thomas Fransham via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 26 11:28:57 PDT 2024


https://github.com/fsfod created https://github.com/llvm/llvm-project/pull/110154

This will fix duplicate and missing linker symbol errors when using CLANG_LINK_CLANG_DYLIB on windows and explicit visibility macros are used.
This is part of the work to enable LLVM_BUILD_LLVM_DYLIB and plugins on window.

>From 857bc2607260ff97ae0f69879de8f304db1c905d Mon Sep 17 00:00:00 2001
From: Thomas Fransham <tfransham at gmail.com>
Date: Thu, 26 Sep 2024 18:59:33 +0100
Subject: [PATCH] [Clang] Update Interpreter tests to use
 clang_target_link_libraries

This will fix duplicate and missing linker symbol errors when using
CLANG_LINK_CLANG_DYLIB on windows and explicit visibility macros are used.
This is part of the work to enable LLVM_BUILD_LLVM_DYLIB and plugins on window.
---
 clang/unittests/Interpreter/CMakeLists.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/clang/unittests/Interpreter/CMakeLists.txt b/clang/unittests/Interpreter/CMakeLists.txt
index ec6f81ea19b960..1ed1216c772e8f 100644
--- a/clang/unittests/Interpreter/CMakeLists.txt
+++ b/clang/unittests/Interpreter/CMakeLists.txt
@@ -16,13 +16,15 @@ add_clang_unittest(ClangReplInterpreterTests
 
   EXPORT_SYMBOLS
   )
-target_link_libraries(ClangReplInterpreterTests PUBLIC
+  
+target_link_libraries(ClangReplInterpreterTests PUBLIC LLVMTestingSupport)
+
+clang_target_link_libraries(ClangReplInterpreterTests PRIVATE
   clangAST
   clangBasic
   clangInterpreter
   clangFrontend
   clangSema
-  LLVMTestingSupport
   )
 
 # Exceptions on Windows are not yet supported.



More information about the cfe-commits mailing list