summaryrefslogtreecommitdiffstats
path: root/source/slang/slang.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang.cpp')
-rw-r--r--source/slang/slang.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp
index a1c8f9b03..f2598786f 100644
--- a/source/slang/slang.cpp
+++ b/source/slang/slang.cpp
@@ -125,6 +125,14 @@ namespace Slang {
const char* getBuildTagString()
{
+ if (UnownedStringSlice(SLANG_TAG_VERSION) == "unknown")
+ {
+ // If the tag is unknown, then we will try to get the timestamp of the shared library
+ // and use that as the version string, so that we can at least return something
+ // that uniquely identifies the build.
+ static String timeStampString = String(SharedLibraryUtils::getSharedLibraryTimestamp((void*)spCreateSession));
+ return timeStampString.getBuffer();
+ }
return SLANG_TAG_VERSION;
}