[PATCH] D72554: [mlir] support building with BUILD_SHARED_LIBS=ON

Hiroshi Inoue via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 13 08:50:36 PST 2020


inouehrs added a comment.

@mehdi_amini @stephenneuendorffer  Thank you for the suggestions.

> Can we fix the cyclic dependency to begin with?

I touched up dependencies and successfully removed cyclic dependency. However, the generated binary does not work well; it seems that module ops are not initialized properly if we compile MLIR as shared libraries.

> According to the description, this code is identical to add_llvm_library but for the  set(LIBTYPE STATIC), this is quite a non-negligible amount of code duplication. Can we refactor this? Can we call to add_llvm_library from here after setting the STATIC lib type?

I cleaned up the code in `add_mlir_library`. Now it is a simple wrapper around `llvm_add_library` (not `add_llvm_library`).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72554/new/

https://reviews.llvm.org/D72554





More information about the llvm-commits mailing list