diff --git a/sycl/source/detail/adapter_impl.hpp b/sycl/source/detail/adapter_impl.hpp index 293d17574d483..a29408bbf203a 100644 --- a/sycl/source/detail/adapter_impl.hpp +++ b/sycl/source/detail/adapter_impl.hpp @@ -218,7 +218,7 @@ class adapter_impl { // represents the unique ids of the last device of each platform // index of this vector corresponds to the index in UrPlatforms vector. std::vector LastDeviceIds; -#ifdef _WIN32 +#if defined(_WIN32) && !defined(SYCL_UR_STATIC_LOADER) void *UrLoaderHandle = nullptr; #endif UrFuncPtrMapT UrFuncPtrs;