[clang] [clang-fuzzer] Set the link language for dictionary (PR #84572)

via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 8 13:58:35 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Colin McEwan (cme)

<details>
<summary>Changes</summary>

clang-fuzzer-dictionary is a C-source tool so by default doesn't link with CMake's specified C++ libraries, which are needed for libclang.

(This fixes issues building with C++ libraries other than the system default)

---
Full diff: https://github.com/llvm/llvm-project/pull/84572.diff


1 Files Affected:

- (modified) clang/tools/clang-fuzzer/dictionary/CMakeLists.txt (+4) 


``````````diff
diff --git a/clang/tools/clang-fuzzer/dictionary/CMakeLists.txt b/clang/tools/clang-fuzzer/dictionary/CMakeLists.txt
index ee4aa587ea54dd..5bf2a5eab872cc 100644
--- a/clang/tools/clang-fuzzer/dictionary/CMakeLists.txt
+++ b/clang/tools/clang-fuzzer/dictionary/CMakeLists.txt
@@ -2,3 +2,7 @@ add_clang_executable(clang-fuzzer-dictionary
   dictionary.c
   )
 
+set_target_properties(clang-fuzzer-dictionary
+  PROPERTIES
+  LINKER_LANGUAGE CXX
+  )

``````````

</details>


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


More information about the cfe-commits mailing list