Skip to content

Commit

Permalink
add macro condition for monolib
Browse files Browse the repository at this point in the history
  • Loading branch information
fs-eire committed Dec 15, 2024
1 parent 3c5b62f commit 936858e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions onnxruntime/core/dll/delay_load_hook.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
// - https://learn.microsoft.com/en-us/cpp/build/reference/understanding-the-helper-function?view=msvc-170#structure-and-constant-definitions
// - https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order#alternate-search-order-for-unpackaged-apps
//
// The DLL DelayLoad hook is only enabled when:
// - The compiler is MSVC
// - at least one of USE_WEBGPU or USE_DML is defined
// The DLL DelayLoad hook is only enabled when the compiler is MSVC and at least one of the following is True:
// - both USE_WEBGPU and BUILD_DAWN_MONOLITHIC_LIBRARY are defined
// - USE_DML is defined
//
#if defined(_MSC_VER) && (defined(USE_WEBGPU) || defined(USE_DML))
#if defined(_MSC_VER) && ((defined(USE_WEBGPU) && defined(BUILD_DAWN_MONOLITHIC_LIBRARY)) || defined(USE_DML))

#include <Windows.h>
#include <delayimp.h>
Expand Down

0 comments on commit 936858e

Please sign in to comment.