[all-commits] [llvm/llvm-project] 369cbc: [lldb] include `LLVMTargetParser` in `LINK_COMPONE...

Andrew Rogers via All-commits all-commits at lists.llvm.org
Wed Jun 25 11:31:11 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 369cbcc1a21ab07ea6ca142a3b87c75d0a1b2014
      https://github.com/llvm/llvm-project/commit/369cbcc1a21ab07ea6ca142a3b87c75d0a1b2014
  Author: Andrew Rogers <andrurogerz at gmail.com>
  Date:   2025-06-25 (Wed, 25 Jun 2025)

  Changed paths:
    M lldb/unittests/Host/CMakeLists.txt

  Log Message:
  -----------
  [lldb] include `LLVMTargetParser` in `LINK_COMPONENTS` (#145606)

## Purpose
Fix duplicate symbol definition errors when building LLDB `HostTests`
against a LLVM Windows DLL.

## Background 
When building LLDB `HostTests` against LLVM built as a Windows DLL,
compilation fails due to multiple duplicate symbol definition errors.
This is because symbols are both exported by the LLVM Windows DLL and
the `LLVMTargetParser` library.

## Overview
The issue is resolved by adding `LLVMTargetParser` (e.g. `TargetParser`)
to `LINK_COMPONENTS`, which adds it to `LLVM_LINK_COMPONENTS`, rather
than `LINK_LIBS`, which links directly against the library. This change
makes it behave correctly when linking against a static or dynamic LLVM.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list