aboutsummaryrefslogtreecommitdiff
path: root/src/backends/backendsCommon/DynamicBackendUtils.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/backends/backendsCommon/DynamicBackendUtils.hpp')
-rw-r--r--src/backends/backendsCommon/DynamicBackendUtils.hpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/backends/backendsCommon/DynamicBackendUtils.hpp b/src/backends/backendsCommon/DynamicBackendUtils.hpp
index 0aa0ac8da5..6d9f11d215 100644
--- a/src/backends/backendsCommon/DynamicBackendUtils.hpp
+++ b/src/backends/backendsCommon/DynamicBackendUtils.hpp
@@ -10,11 +10,13 @@
#include <armnn/Exceptions.hpp>
+#include <boost/format.hpp>
+
#include <string>
-#include <dlfcn.h>
#include <vector>
-
-#include <boost/format.hpp>
+#if defined(__unix__)
+#include <dlfcn.h>
+#endif
#if !defined(DYNAMIC_BACKEND_PATHS)
#define DYNAMIC_BACKEND_PATHS ""
@@ -58,6 +60,7 @@ private:
template<typename EntryPointType>
EntryPointType DynamicBackendUtils::GetEntryPoint(const void* sharedObjectHandle, const char* symbolName)
{
+#if defined(__unix__)
if (sharedObjectHandle == nullptr)
{
throw RuntimeException("GetEntryPoint error: invalid handle");
@@ -75,6 +78,9 @@ EntryPointType DynamicBackendUtils::GetEntryPoint(const void* sharedObjectHandle
}
return entryPoint;
+#else
+ throw RuntimeException("Dynamic backends not supported on this platform");
+#endif
}
} // namespace armnn