[Lldb-commits] [lldb] 8f7db76 - [lldb] Conditionalize target_link_libraries on the target

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 25 09:50:39 PDT 2022


Author: Jonas Devlieghere
Date: 2022-03-25T09:50:34-07:00
New Revision: 8f7db763ef7f30ec952bdb00adb6f99f980cb427

URL: https://github.com/llvm/llvm-project/commit/8f7db763ef7f30ec952bdb00adb6f99f980cb427
DIFF: https://github.com/llvm/llvm-project/commit/8f7db763ef7f30ec952bdb00adb6f99f980cb427.diff

LOG: [lldb] Conditionalize target_link_libraries on the target

Fixes "Cannot specify link libraries for target "lldb-target-fuzzer"
which is not built by this project." Normally that's taken care of by
add_llvm_fuzzer but we need target_link_libraries for liblldb and our
utility library.

Added: 
    

Modified: 
    lldb/tools/lldb-fuzzer/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/lldb/tools/lldb-fuzzer/CMakeLists.txt b/lldb/tools/lldb-fuzzer/CMakeLists.txt
index 44df5f193b44a..b87e08720b59b 100644
--- a/lldb/tools/lldb-fuzzer/CMakeLists.txt
+++ b/lldb/tools/lldb-fuzzer/CMakeLists.txt
@@ -9,9 +9,10 @@ add_llvm_fuzzer(lldb-target-fuzzer
   lldb-target-fuzzer.cpp
   )
 
-target_link_libraries(lldb-target-fuzzer
-  PRIVATE
-  liblldb
-  lldbFuzzerUtils
-  )
-
+if(TARGET lldb-target-fuzzer)
+  target_link_libraries(lldb-target-fuzzer
+    PRIVATE
+    liblldb
+    lldbFuzzerUtils
+    )
+endif()


        


More information about the lldb-commits mailing list