From 5821047aaca23184ee30fb212bfbbfa25967448b Mon Sep 17 00:00:00 2001 From: John Demme Date: Mon, 16 Aug 2021 19:18:23 -0700 Subject: [PATCH] [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 --- mlir/cmake/modules/AddMLIRPython.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/mlir/cmake/modules/AddMLIRPython.cmake b/mlir/cmake/modules/AddMLIRPython.cmake index 48390f4..b1e2f0b 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() -- 2.7.4