From 126e3e7527243fd838bf2929e6483326815283de Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Mon, 27 Feb 2023 12:33:54 +0000 Subject: [PATCH] [FBcode->GH] Bump SoLoader and Allow building torchvision operators statically (#7342) Co-authored-by: Eric Sauser Co-authored-by: Sim Sun --- android/build.gradle | 2 +- torchvision/csrc/macros.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index f28ba9112ff..f7995a07f5b 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -14,7 +14,7 @@ allprojects { androidSupportAppCompatV7Version = "28.0.0" fbjniJavaOnlyVersion = "0.0.3" - soLoaderNativeLoaderVersion = "0.10.4" + soLoaderNativeLoaderVersion = "0.10.5" pytorchAndroidVersion = "1.12" } diff --git a/torchvision/csrc/macros.h b/torchvision/csrc/macros.h index 8a7136fad86..64ca89429a9 100644 --- a/torchvision/csrc/macros.h +++ b/torchvision/csrc/macros.h @@ -1,6 +1,6 @@ #pragma once -#ifdef _WIN32 +#if defined(_WIN32) && !defined(TORCHVISION_BUILD_STATIC_LIBS) #if defined(torchvision_EXPORTS) #define VISION_API __declspec(dllexport) #else