diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2021-01-26 12:15:08 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-26 09:15:08 -0800 |
| commit | 798d7731eca286df456bc2ec56c0695ba006b472 (patch) | |
| tree | 37ced2db457a08aa8cfc81f19f18daf9ca26d3f2 /source/core/slang-platform.h | |
| parent | 00fad59d49d31538270b811903aeb449c97ca152 (diff) | |
Improved NVRTC location finding (#1674)
* #include an absolute path didn't work - because paths were taken to always be relative.
* WIP more sophisticated mechanism to find NVRTC.
* Improve nvrtc searching to include PATH.
* Make getting an extension able to differentiate between no extension, and just a .
* Add comment.
* Add support for searching instance path.
* Small improvements around scope and finding NVRTC.
* Improve documentation around NVRTC loading.
Diffstat (limited to 'source/core/slang-platform.h')
| -rw-r--r-- | source/core/slang-platform.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/core/slang-platform.h b/source/core/slang-platform.h index 804e2b773..ff7f1ccd9 100644 --- a/source/core/slang-platform.h +++ b/source/core/slang-platform.h @@ -106,6 +106,7 @@ namespace Slang static String calcPlatformPath(const UnownedStringSlice& path); static void calcPlatformPath(const UnownedStringSlice& path, StringBuilder& outBuilder); + private: /// Not constructible! SharedLibrary(); @@ -131,6 +132,10 @@ namespace Slang /// Given an environment name returns the set system variable. /// Will return SLANG_E_NOT_FOUND if the variable is not set static SlangResult getEnvironmentVariable(const UnownedStringSlice& name, StringBuilder& out); + + /// Get the path to this instance (the path to the dll/executable/shared library the call is in) + /// NOTE! This is not supported on all platforms, and will return SLANG_E_NOT_IMPLEMENTED in that scenario + static SlangResult getInstancePath(StringBuilder& out); }; #ifndef _MSC_VER |
