[all-commits] [llvm/llvm-project] 2c3cf6: Make TableGenGlobalISel an object library

Aaron Puchert via All-commits all-commits at lists.llvm.org
Wed Mar 31 13:22:24 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2c3cf62d4a26de85aab180bb43a579c913b17f3e
      https://github.com/llvm/llvm-project/commit/2c3cf62d4a26de85aab180bb43a579c913b17f3e
  Author: Aaron Puchert <aaronpuchert at alice-dsl.net>
  Date:   2021-03-31 (Wed, 31 Mar 2021)

  Changed paths:
    M llvm/unittests/TableGen/CMakeLists.txt
    M llvm/utils/TableGen/CMakeLists.txt
    M llvm/utils/TableGen/GlobalISel/CMakeLists.txt

  Log Message:
  -----------
  Make TableGenGlobalISel an object library

That's how it was originally intended but that wasn't possible because
we still needed to support older CMake versions.

The problem here is that the sources in TableGenGlobalISel are meant to
be linked into both llvm-tblgen and TableGenTests (a unit test), but not
be part of LLVM proper. So they shouldn't be an ordinary LLVM component.
Because they are used in llvm-tblgen, they can't draw in the LLVM dylib
dependency, but then we'd have to do the same thing in TableGenTests to
make sure we don't link both a static Support library and another copy
through the LLVM dylib.

With an object library we're just reusing the object files and don't
have to care about dependencies at all.

Reviewed By: beanz

Differential Revision: https://reviews.llvm.org/D74588




More information about the All-commits mailing list