summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/compiler-core/slang-nvrtc-compiler.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/source/compiler-core/slang-nvrtc-compiler.cpp b/source/compiler-core/slang-nvrtc-compiler.cpp
index b581d21fd..b37743a32 100644
--- a/source/compiler-core/slang-nvrtc-compiler.cpp
+++ b/source/compiler-core/slang-nvrtc-compiler.cpp
@@ -17,6 +17,8 @@
namespace nvrtc
{
+
+
typedef enum {
NVRTC_SUCCESS = 0,
NVRTC_ERROR_OUT_OF_MEMORY = 1,
@@ -644,8 +646,8 @@ struct NVRTCPathVisitor : Path::Visitor
static SlangResult _findAndLoadNVRTC(ISlangSharedLibraryLoader* loader, ComPtr<ISlangSharedLibrary>& outLibrary)
{
-#if SLANG_WINDOWS_FAMILY
- // We only need to search 64 bit versions on windows
+#if SLANG_WINDOWS_FAMILY && SLANG_PTR_IS_64
+ // We only need to search 64 bit versions on windows
NVRTCPathVisitor visitor(UnownedStringSlice::fromLiteral("nvrtc64_"));
// First try the instance path (if supported on platform)
@@ -717,7 +719,11 @@ static SlangResult _findAndLoadNVRTC(ISlangSharedLibraryLoader* loader, ComPtr<I
return SLANG_OK;
}
}
+#else
+ SLANG_UNUSED(loader);
+ SLANG_UNUSED(outLibrary);
#endif
+
// This is an official-ish list of versions is here:
// https://developer.nvidia.com/cuda-toolkit-archive
@@ -729,8 +735,10 @@ static SlangResult _findAndLoadNVRTC(ISlangSharedLibraryLoader* loader, ComPtr<I
return SLANG_E_NOT_FOUND;
}
+
/* static */SlangResult NVRTCDownstreamCompilerUtil::locateCompilers(const String& path, ISlangSharedLibraryLoader* loader, DownstreamCompilerSet* set)
{
+
ComPtr<ISlangSharedLibrary> library;
// If the user supplies a path to their preferred version of NVRTC,
@@ -769,5 +777,4 @@ static SlangResult _findAndLoadNVRTC(ISlangSharedLibraryLoader* loader, ComPtr<I
return SLANG_OK;
}
-
}