Skip to content

Commit

Permalink
fix condition of onnxruntime_ENABLE_DELAY_LOADING_WIN_DLLS
Browse files Browse the repository at this point in the history
  • Loading branch information
fs-eire committed Dec 20, 2024
1 parent 67eef6a commit 4d8b19c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,7 @@ option(onnxruntime_DEBUG_NODE_INPUTS_OUTPUTS "Dump debug information about node
cmake_dependent_option(onnxruntime_DEBUG_NODE_INPUTS_OUTPUTS_ENABLE_DUMP_TO_SQLDB "Build dump debug information about node inputs and outputs with support for sql database." OFF "onnxruntime_DEBUG_NODE_INPUTS_OUTPUTS" OFF)

# When loading a delay loaded DLL, Windows searches the main EXE's folder first.
# In a Python process, it searches where python.exe lives, but it doesn't search the python package's installation folder. Therefore we cannot enable this flag when Python is enabled.
cmake_dependent_option(onnxruntime_ENABLE_DELAY_LOADING_WIN_DLLS "Delay load some of the dependent DLls that are part of the OS" ON "WIN32;NOT GDK_PLATFORM;NOT onnxruntime_ENABLE_PYTHON" OFF)
cmake_dependent_option(onnxruntime_ENABLE_DELAY_LOADING_WIN_DLLS "Delay load some of the dependent DLls that are part of the OS" ON "WIN32;NOT GDK_PLATFORM" OFF)
option(onnxruntime_USE_DML "Build with DirectML support" OFF)
option(onnxruntime_USE_MIGRAPHX "Build with AMDMIGraphX support" OFF)
option(onnxruntime_USE_WINML "Build with WinML support" OFF)
Expand Down
1 change: 1 addition & 0 deletions onnxruntime/test/webgpu/delay_load/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ int test_main() {
HMODULE hModule = LoadLibraryA("dlls\\onnxruntime.dll");
if (hModule == NULL) {
std::cout << "Failed to load dlls\\onnxruntime.dll" << std::endl;
std::cout << "Error code: " << GetLastError() << std::endl;
return 1;
}

Expand Down

0 comments on commit 4d8b19c

Please sign in to comment.