Skip to content

Commit 4e6f5e6

Browse files
committed
Revert "[MLIR][Python] move generated type stubs to build directory (#157697)"
This reverts commit 53bcfe2.
1 parent b3306cb commit 4e6f5e6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

mlir/cmake/modules/AddMLIRPython.cmake

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,7 @@ function(generate_type_stubs MODULE_NAME DEPENDS_TARGET MLIR_DEPENDS_TARGET OUTP
138138
--recursive
139139
--include-private
140140
--output-dir
141-
"${OUTPUT_DIR}"
142-
--quiet)
141+
"${OUTPUT_DIR}")
143142

144143
list(TRANSFORM ARG_OUTPUTS PREPEND "${OUTPUT_DIR}/" OUTPUT_VARIABLE _generated_type_stubs)
145144
add_custom_command(
@@ -308,14 +307,14 @@ function(add_mlir_python_modules name)
308307
${_module_name}
309308
${_extension_target}
310309
${name}
311-
"${CMAKE_CURRENT_BINARY_DIR}/_mlir_libs"
310+
"${CMAKE_CURRENT_SOURCE_DIR}/mlir/_mlir_libs"
312311
OUTPUTS "${_generate_type_stubs}"
313312
)
314313
add_dependencies("${modules_target}" "${NB_STUBGEN_CUSTOM_TARGET}")
315314
set(_stubgen_target "${MLIR_PYTHON_PACKAGE_PREFIX}.${_module_name}_type_stub_gen")
316315
declare_mlir_python_sources(
317316
${_stubgen_target}
318-
ROOT_DIR "${CMAKE_CURRENT_BINARY_DIR}/_mlir_libs"
317+
ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/mlir/_mlir_libs"
319318
ADD_TO_PARENT "${sources_target}"
320319
SOURCES "${_generate_type_stubs}"
321320
)

0 commit comments

Comments
 (0)