File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -153,10 +153,10 @@ set(MLIRWholeArchiveLibs
153153function (whole_archive_link target lib_dir)
154154 get_property (link_flags TARGET ${target} PROPERTY LINK_FLAGS )
155155 if ("${CMAKE_SYSTEM_NAME} " STREQUAL "Darwin" )
156- set (link_flags "${link_flags} -L${lib_dir} " )
156+ set (link_flags "${link_flags} -L${lib_dir} " )
157157 foreach (LIB ${ARGN} )
158158 string (CONCAT link_flags ${link_flags}
159- "-Wl,-force_load ${lib_dir} /lib${LIB} .a " )
159+ "-Wl,-force_load, ${lib_dir} /lib${LIB} .a " )
160160 endforeach (LIB)
161161 elseif (MSVC )
162162 foreach (LIB ${ARGN} )
@@ -177,9 +177,9 @@ function(whole_archive_link_mlir target)
177177endfunction (whole_archive_link_mlir)
178178
179179function (whole_archive_link_onnf target )
180- foreach (LIB ${ARGN} )
181- add_dependencies (${target} ${LIB } )
182- endforeach (LIB )
180+ foreach (lib_target ${ARGN} )
181+ add_dependencies (${target} ${lib_target } )
182+ endforeach (lib_target )
183183 whole_archive_link(${target} ${CMAKE_BINARY_DIR} /lib ${ARGN} )
184184endfunction (whole_archive_link_onnf)
185185
Original file line number Diff line number Diff line change @@ -70,9 +70,9 @@ add_subdirectory(runtime)
7070
7171add_executable (onnf main.cpp)
7272
73- target_link_libraries (onnf builder compiler ${MLIRLibs} onnf_transform)
74- whole_archive_link_mlir(onnf ${MLIRWholeArchiveLibs} )
73+ target_link_libraries (onnf builder ${MLIRLibs} onnf_transform)
7574set_target_properties (onnf PROPERTIES LINK_FLAGS "-lz" )
75+ whole_archive_link_mlir(onnf ${MLIRWholeArchiveLibs} )
7676
7777target_include_directories (onnf PRIVATE ${CMAKE_SOURCE_DIR} )
7878target_include_directories (onnf PRIVATE ${CMAKE_BINARY_DIR} )
You can’t perform that action at this time.
0 commit comments