summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-stdlib.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-stdlib.cpp')
-rw-r--r--source/slang/slang-stdlib.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/slang/slang-stdlib.cpp b/source/slang/slang-stdlib.cpp
index e0727f19a..2bbf3c1c0 100644
--- a/source/slang/slang-stdlib.cpp
+++ b/source/slang/slang-stdlib.cpp
@@ -225,6 +225,7 @@ namespace Slang
String Session::getCoreLibraryCode()
{
+#if !defined(SLANG_DISABLE_STDLIB_SOURCE)
if (coreLibraryCode.getLength() > 0)
return coreLibraryCode;
@@ -235,11 +236,14 @@ namespace Slang
#include "core.meta.slang.h"
coreLibraryCode = sb.ProduceString();
+#endif
+
return coreLibraryCode;
}
String Session::getHLSLLibraryCode()
{
+#if !defined(SLANG_DISABLE_STDLIB_SOURCE)
if (hlslLibraryCode.getLength() > 0)
return hlslLibraryCode;
@@ -250,6 +254,7 @@ namespace Slang
#include "hlsl.meta.slang.h"
hlslLibraryCode = sb.ProduceString();
+#endif
return hlslLibraryCode;
}
}