mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-02 03:55:34 +00:00
Add ARM64X forwarder libs
This commit is contained in:
parent
46e026e900
commit
4f5d6a0e4d
1 changed files with 28 additions and 0 deletions
|
|
@ -828,3 +828,31 @@ endif()
|
|||
# However, there are no cuda imports in winml_dll, and the linker throws the 4199 warning.
|
||||
# This is needed to allow winml_dll build with cuda enabled.
|
||||
target_link_options(winml_dll PRIVATE /ignore:4199)
|
||||
|
||||
if (winml_is_inbox)
|
||||
# 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)
|
||||
|
||||
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})
|
||||
endfunction()
|
||||
if (WAI_ARCH STREQUAL x64 OR WAI_ARCH STREQUAL arm64)
|
||||
if (TARGET winml_dll)
|
||||
duplicate_shared_library(winml_dll Windows_ai_machinelearning_${WAI_ARCH})
|
||||
target_compile_features(Windows_ai_machinelearning_${WAI_ARCH} PRIVATE cxx_std_17)
|
||||
target_precompiled_header(Windows_ai_machinelearning_${WAI_ARCH} pch.h)
|
||||
endif()
|
||||
if (TARGET onnxruntime)
|
||||
duplicate_shared_library(onnxruntime onnxruntime_${WAI_ARCH})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Reference in a new issue