Skip to content

Commit 8e54f24

Browse files
Disable add_mlir_aggregate() debug file generation.
* Leaves it as a commented out area with a note on how to debug.
1 parent 50b68a3 commit 8e54f24

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

mlir/cmake/modules/AddMLIR.cmake

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -339,18 +339,21 @@ function(add_mlir_aggregate name)
339339
if(MSVC)
340340
set_property(TARGET ${name} PROPERTY WINDOWS_EXPORT_ALL_SYMBOLS ON)
341341
endif()
342-
string(APPEND _debugmsg
343-
": MAIN LIBRARY:\n"
344-
" OBJECTS = ${_objects}\n"
345-
" SOURCES = $<TARGET_GENEX_EVAL:${name},$<TARGET_PROPERTY:${name},SOURCES>>\n"
346-
" DEPS = ${_deps}\n"
347-
" LINK_LIBRARIES = $<TARGET_GENEX_EVAL:${name},$<TARGET_PROPERTY:${name},LINK_LIBRARIES>>\n"
348-
" MLIR_AGGREGATE_EXCLUDE_LIBS = $<TARGET_GENEX_EVAL:${name},$<TARGET_PROPERTY:${name},MLIR_AGGREGATE_EXCLUDE_LIBS>>\n"
349-
)
350-
file(GENERATE OUTPUT
351-
"${CMAKE_CURRENT_BINARY_DIR}/${name}.aggregate_debug.txt"
352-
CONTENT "${_debugmsg}"
353-
)
342+
343+
# Debugging generator expressions can be hard. Uncomment the below to emit
344+
# files next to the library with a lot of debug information:
345+
# string(APPEND _debugmsg
346+
# ": MAIN LIBRARY:\n"
347+
# " OBJECTS = ${_objects}\n"
348+
# " SOURCES = $<TARGET_GENEX_EVAL:${name},$<TARGET_PROPERTY:${name},SOURCES>>\n"
349+
# " DEPS = ${_deps}\n"
350+
# " LINK_LIBRARIES = $<TARGET_GENEX_EVAL:${name},$<TARGET_PROPERTY:${name},LINK_LIBRARIES>>\n"
351+
# " MLIR_AGGREGATE_EXCLUDE_LIBS = $<TARGET_GENEX_EVAL:${name},$<TARGET_PROPERTY:${name},MLIR_AGGREGATE_EXCLUDE_LIBS>>\n"
352+
# )
353+
# file(GENERATE OUTPUT
354+
# "${CMAKE_CURRENT_BINARY_DIR}/${name}.aggregate_debug.txt"
355+
# CONTENT "${_debugmsg}"
356+
# )
354357
endfunction(add_mlir_aggregate)
355358

356359
# Adds an MLIR library target for installation.

0 commit comments

Comments
 (0)