[all-commits] [llvm/llvm-project] a33ae9: [NFC][CMake] Explicitly link to MC when needed

Roman Lebedev via All-commits all-commits at lists.llvm.org
Tue Dec 13 05:25:18 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a33ae9ac3593d999e16eacc8aa22e8bd8e220409
      https://github.com/llvm/llvm-project/commit/a33ae9ac3593d999e16eacc8aa22e8bd8e220409
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M llvm/lib/Target/ARM/Disassembler/CMakeLists.txt
    M llvm/lib/Target/AVR/Disassembler/CMakeLists.txt
    M llvm/lib/Target/BPF/Disassembler/CMakeLists.txt
    M llvm/lib/Target/MSP430/Disassembler/CMakeLists.txt
    M llvm/lib/Target/Mips/Disassembler/CMakeLists.txt
    M llvm/lib/Target/PowerPC/Disassembler/CMakeLists.txt
    M llvm/lib/Target/Sparc/Disassembler/CMakeLists.txt
    M llvm/lib/Target/VE/Disassembler/CMakeLists.txt
    M llvm/lib/Target/XCore/Disassembler/CMakeLists.txt
    M llvm/tools/llvm-exegesis/lib/AArch64/CMakeLists.txt
    M llvm/tools/llvm-exegesis/lib/Mips/CMakeLists.txt
    M llvm/tools/llvm-exegesis/lib/PowerPC/CMakeLists.txt
    M llvm/tools/llvm-exegesis/lib/X86/CMakeLists.txt

  Log Message:
  -----------
  [NFC][CMake] Explicitly link to MC when needed

These targets use `MCInst`, but don't explicitly link
to the library providing it (MC), and just rely on it
being pulled transitively through e.g. MCDisassembler,
but that only pulls includes, and does not link to it.

Case in point, when i add explicit destructor to `MCInst`,
defined in `.cpp`, these targets were failing to link.




More information about the All-commits mailing list