[all-commits] [llvm/llvm-project] 686bd6: [MLIR] Fix build with make

Nikita Popov via All-commits all-commits at lists.llvm.org
Fri May 6 05:52:51 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 686bd6dd2bf53763b720a1ee60ee01d9054f9434
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-05-06 (Fri, 06 May 2022)

  Changed paths:
    M llvm/cmake/modules/AddLLVM.cmake
    M mlir/tools/mlir-pdll/CMakeLists.txt

  Log Message:
  [MLIR] Fix build with make

https://reviews.llvm.org/D124075 causes MLIR to no longer build
when using make rather than ninja, due to a tablegen-generated
header being used before it is created.

It seems that this is related to the use of LLVM_ENABLE_OBJLIB when
using add_tablgen with a non-Ninja/Xcode generator. In that case an
intermediate objlib target is generated.

This patch fixes the issue by a) declaring dependencies in
add_tablegen for mlir-pdll and b) making sure those dependencies
are added to the objlib target.

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

More information about the All-commits mailing list