[PATCH] D99829: [mlgo] fix build rules

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 3 12:59:26 PDT 2021


This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb32e76c6d507: [mlgo] fix build rules (authored by mtrofin).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99829

Files:
  llvm/CMakeLists.txt
  llvm/lib/Analysis/CMakeLists.txt


Index: llvm/lib/Analysis/CMakeLists.txt
===================================================================
--- llvm/lib/Analysis/CMakeLists.txt
+++ llvm/lib/Analysis/CMakeLists.txt
@@ -6,9 +6,10 @@
     include(TensorFlowCompile)
     tfcompile(${LLVM_INLINER_MODEL_PATH} serve action InlinerSizeModel llvm::InlinerSizeModel)
     list(APPEND GeneratedMLSources
-      $<TARGET_OBJECTS:tf_xla_runtime_objects>
-      ${GENERATED_OBJS}
+      ${GENERATED_HEADERS}
     )
+    LIST(APPEND MLDeps tf_xla_runtime)
+    LIST(APPEND MLLinkDeps tf_xla_runtime ${GENERATED_OBJS})
   endif()
 
   if (DEFINED LLVM_HAVE_TF_API)
@@ -137,6 +138,7 @@
 
   DEPENDS
   intrinsics_gen
+  ${MLDeps}
 
   LINK_LIBS
   ${MLLinkDeps}
Index: llvm/CMakeLists.txt
===================================================================
--- llvm/CMakeLists.txt
+++ llvm/CMakeLists.txt
@@ -794,6 +794,9 @@
   include_directories(${TENSORFLOW_AOT_PATH}/include)
   add_subdirectory(${TENSORFLOW_AOT_PATH}/xla_aot_runtime_src
     ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/tf_runtime)
+  install(TARGETS tf_xla_runtime EXPORT LLVMExports 
+    ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT tf_xla_runtime)
+  set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS tf_xla_runtime)
 endif()
 
 # Keep the legacy CMake flag ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER for


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99829.335101.patch
Type: text/x-patch
Size: 1327 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210403/0563891c/attachment.bin>


More information about the llvm-commits mailing list