Release version of onnxruntime.dll has a dependency on dbghelp.dll
Describe the issue
Release version of onnxruntime.dll has a dependency on dbghelp.dll (using functions SymInitialize, SymFromAddr, SymSetOptions) while this functionality is not needed in a release build. This is a regression, likely caused by #21300 (2024-07-10).
To reproduce
.\build.bat --config RelWithDebInfo --build_shared_lib
dumpbin /imports onnxruntime.dll
Urgency
No response
Platform
Windows
OS Version
Any
ONNX Runtime Installation
Built from Source
ONNX Runtime Version or Commit ID
1.19
ONNX Runtime API
C++
Architecture
X64
Execution Provider
Default CPU
Execution Provider Library Version
No response
Thanks for flagging & spotting this -- is the unnecessary dependency causing any performance issues for you or larger package sizes?
One of our customers complains that they are not able to load our DLL while using LoadLibraryEx(..., LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR) (our DLL has a dependency on onnxruntime.dll).
We are waiting on more task but this should be resolved early next week
I can confirm 1.18.1 release does not have the issue but the latest one(1.19.0) has it.
The commit id 8749fa381eddbbb97a776280fd55e7959a1fc21b seems to be fine.
It is because PR #21410.
The dep is pulled by abseil's symbolize library.
Unfortunately, there is no formal way to disable it: https://github.com/abseil/abseil-cpp/pull/1363