Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions cmake/onnxruntime_unittests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1520,8 +1520,13 @@ endif()
onnxruntime_common ${CMAKE_DL_LIBS})
set_target_properties(onnxruntime_runtime_path_test_shared_library PROPERTIES AIX_SHARED_LIBRARY_ARCHIVE OFF)
else()
target_link_libraries(onnxruntime_runtime_path_test_shared_library PRIVATE
onnxruntime_common cpuinfo ${CMAKE_DL_LIBS})
if (CPUINFO_SUPPORTED)
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cpuinfo guard should include an Emscripten exclusion to be consistent with similar patterns elsewhere in this file. Most other cpuinfo linking checks use the pattern if (CPUINFO_SUPPORTED AND NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten") (see lines 1359, 1567, 1699, 1892). This is necessary because CPUINFO_SUPPORTED can be TRUE on Emscripten when XNNPACK is enabled, but cpuinfo should not be linked in ORT code for that configuration (see cmake/external/onnxruntime_external_deps.cmake lines 351-356).

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any comment about this ? @BODAPATIMAHESH ?

target_link_libraries(onnxruntime_runtime_path_test_shared_library PRIVATE
onnxruntime_common cpuinfo ${CMAKE_DL_LIBS})
else()
target_link_libraries(onnxruntime_runtime_path_test_shared_library PRIVATE
onnxruntime_common ${CMAKE_DL_LIBS})
endif()
endif()
target_include_directories(onnxruntime_runtime_path_test_shared_library PRIVATE ${ONNXRUNTIME_ROOT})

Expand Down
Loading