[PATCH] D77515: [mlir] Remove need for static global ctors from mlir-translate
Stephen Neuendorffer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 5 14:25:57 PDT 2020
stephenneuendorffer accepted this revision.
stephenneuendorffer added a comment.
Thanks for doing this, it will definitely simplify many things about the way linkage is done.
================
Comment at: mlir/include/mlir/InitAllTranslations.h:30
+inline void registerAllTranslations() {
+ static bool init_once = []() {
+ registerFromLLVMIRTranslation();
----------------
nit: "init_once" is a little misleading, since this doesn't actually ensure that.
================
Comment at: mlir/test/EDSC/CMakeLists.txt:24-30
-whole_archive_link(mlir-edsc-builder-api-test
- MLIRAffine
- MLIRLinalgOps
- MLIRLoopOps
- MLIRStandardOps
- MLIRVector
- MLIRTransforms
----------------
Please verify these changes with BUILD_SHARED_LIBS=on. It should have been the case that the whole_archive_link an link_libraries were mutually exclusive, so I'd expect that all of these need to go in a target_link_libraries instead.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77515/new/
https://reviews.llvm.org/D77515
More information about the llvm-commits
mailing list