File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -376,11 +376,15 @@ if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64|AMD64")
376376 qnn_schema
377377 qnn_manager
378378 qnn_executorch_header
379- extension_tensor
380379 qnn_backend_options
381380 wrappers
382381 qnn_executorch_logging
383382 )
383+ # extension_tensor is bundled into the shared runtime, so naming it again here
384+ # would give this module a second copy of what that library already provides.
385+ if (NOT EXECUTORCH_BUILD_SHARED)
386+ target_link_libraries (PyQnnManagerAdaptor PRIVATE extension_tensor )
387+ endif ()
384388 # Same reasoning as the delegate above: take the runtime from the shared
385389 # library when there is one, rather than embedding a second registry.
386390 if (EXECUTORCH_BUILD_SHARED)
Original file line number Diff line number Diff line change @@ -277,8 +277,10 @@ function(executorch_target_retain_shared_library target_name library_target)
277277 endif ()
278278 if (APPLE OR MSVC )
279279 # TARGET_LINKER_FILE rather than TARGET_FILE: on Windows the linker needs
280- # the import library, not the DLL itself.
281- set (_retain_flags "SHELL:$<TARGET_LINKER_FILE :${library_target} >" )
280+ # the import library, not the DLL itself. Plain rather than SHELL: this is a
281+ # single path, and SHELL splits on spaces, so a path containing one would
282+ # reach the linker as two broken arguments.
283+ set (_retain_flags "$<TARGET_LINKER_FILE :${library_target} >" )
282284 else ()
283285 # push-state/pop-state rather than closing with an explicit --as-needed:
284286 # that would leave --as-needed in force for everything after it on the line
You can’t perform that action at this time.
0 commit comments