Skip to content

Commit 5cb77bc

Browse files
committed
Update
[ghstack-poisoned]
2 parents 050327c + 223a2b4 commit 5cb77bc

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

backends/qualcomm/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff 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)

tools/cmake/Utils.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)