summaryrefslogtreecommitdiffstats
path: root/source/slangc/main.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2025-03-24 17:01:55 -0700
committerGitHub <noreply@github.com>2025-03-24 17:01:55 -0700
commitc54bc9ebff0691c397885363e0da7a122e3e407d (patch)
treef29681f8aa35b5b01e169a35a77cdd81317a8330 /source/slangc/main.cpp
parent0d7d6468dfcabb759ec40921e5da3a8598f1c770 (diff)
Don't load cached builtin module in slang-bootstrap. (#6667)
* Don't load cached builtin module in slang-bootstrap. * Fixes. * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Diffstat (limited to 'source/slangc/main.cpp')
-rw-r--r--source/slangc/main.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/slangc/main.cpp b/source/slangc/main.cpp
index 718de6968..ae663e050 100644
--- a/source/slangc/main.cpp
+++ b/source/slangc/main.cpp
@@ -6,6 +6,7 @@ SLANG_API void spSetCommandLineCompilerMode(SlangCompileRequest* request);
#include "../core/slang-io.h"
#include "../core/slang-test-tool-util.h"
+#include "../slang/slang-internal.h"
using namespace Slang;
@@ -102,7 +103,12 @@ SLANG_TEST_TOOL_API SlangResult innerMain(
// Just create the global session in the regular way if there isn't one set
SlangGlobalSessionDesc desc = {};
desc.enableGLSL = true;
- SLANG_RETURN_ON_FAIL(slang_createGlobalSession2(&desc, session.writeRef()));
+ Slang::GlobalSessionInternalDesc internalDesc = {};
+#ifdef SLANG_BOOTSTRAP
+ internalDesc.isBootstrap = true;
+#endif
+ SLANG_RETURN_ON_FAIL(
+ slang_createGlobalSessionImpl(&desc, &internalDesc, session.writeRef()));
}
if (!shouldEmbedPrelude(argv, argc))