mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
Restore arm64x onnxruntime binaries (#9950)
This commit is contained in:
parent
5e4d58a50a
commit
63c8889944
1 changed files with 26 additions and 0 deletions
|
|
@ -215,6 +215,32 @@ if (WINDOWS_STORE)
|
|||
target_link_options(onnxruntime PRIVATE /DELAYLOAD:api-ms-win-core-libraryloader-l1-2-1.dll)
|
||||
endif()
|
||||
|
||||
if (winml_is_inbox)
|
||||
# Apply linking flags required by inbox static analysis tools
|
||||
target_link_options(onnxruntime PRIVATE ${os_component_link_flags_list})
|
||||
# Link *_x64/*_arm64 DLLs for the ARM64X forwarder
|
||||
function(duplicate_shared_library target new_target)
|
||||
get_target_property(sources ${target} SOURCES)
|
||||
get_target_property(compile_definitions ${target} COMPILE_DEFINITIONS)
|
||||
get_target_property(compile_options ${target} COMPILE_OPTIONS)
|
||||
get_target_property(include_directories ${target} INCLUDE_DIRECTORIES)
|
||||
get_target_property(link_libraries ${target} LINK_LIBRARIES)
|
||||
get_target_property(link_flags ${target} LINK_FLAGS)
|
||||
get_target_property(link_options ${target} LINK_OPTIONS)
|
||||
add_library(${new_target} SHARED ${sources})
|
||||
add_dependencies(${target} ${new_target})
|
||||
target_compile_definitions(${new_target} PRIVATE ${compile_definitions})
|
||||
target_compile_options(${new_target} PRIVATE ${compile_options})
|
||||
target_include_directories(${new_target} PRIVATE ${include_directories})
|
||||
target_link_libraries(${new_target} PRIVATE ${link_libraries})
|
||||
set_property(TARGET ${new_target} PROPERTY LINK_FLAGS "${link_flags}")
|
||||
target_link_options(${new_target} PRIVATE ${link_options})
|
||||
endfunction()
|
||||
if (WAI_ARCH STREQUAL x64 OR WAI_ARCH STREQUAL arm64)
|
||||
duplicate_shared_library(onnxruntime onnxruntime_${WAI_ARCH})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Assemble the Apple static framework (iOS and macOS)
|
||||
if(onnxruntime_BUILD_APPLE_FRAMEWORK)
|
||||
set(STATIC_LIB_DIR ${CMAKE_CURRENT_BINARY_DIR}/static_libraries)
|
||||
|
|
|
|||
Loading…
Reference in a new issue