[Mlir-commits] [mlir] 5821047 - [MLIR] [Python] Fix out-of-tree Windows python bindings

John Demme llvmlistbot at llvm.org
Mon Aug 16 19:20:25 PDT 2021


Author: John Demme
Date: 2021-08-16T19:18:54-07:00
New Revision: 5821047aaca23184ee30fb212bfbbfa25967448b

URL: https://github.com/llvm/llvm-project/commit/5821047aaca23184ee30fb212bfbbfa25967448b
DIFF: https://github.com/llvm/llvm-project/commit/5821047aaca23184ee30fb212bfbbfa25967448b.diff

LOG: [MLIR] [Python] Fix out-of-tree Windows python bindings

MSVC needs to know where to put the archive (.lib) as well as the runtime
(.dll). If left to the default location, multiple rules to generate the same
file will be produced, creating a Ninja error.

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

Added: 
    

Modified: 
    mlir/cmake/modules/AddMLIRPython.cmake

Removed: 
    


################################################################################
diff  --git a/mlir/cmake/modules/AddMLIRPython.cmake b/mlir/cmake/modules/AddMLIRPython.cmake
index 48390f45ff90c..b1e2f0b3f5559 100644
--- a/mlir/cmake/modules/AddMLIRPython.cmake
+++ b/mlir/cmake/modules/AddMLIRPython.cmake
@@ -494,6 +494,7 @@ function(add_mlir_python_extension libname extname)
     set_target_properties(
       ${libname} PROPERTIES
       RUNTIME_OUTPUT_DIRECTORY ${ARG_OUTPUT_DIRECTORY}
+      ARCHIVE_OUTPUT_DIRECTORY ${ARG_OUTPUT_DIRECTORY}
     )
   endif()
 


        


More information about the Mlir-commits mailing list