From c54bc9ebff0691c397885363e0da7a122e3e407d Mon Sep 17 00:00:00 2001 From: Yong He Date: Mon, 24 Mar 2025 17:01:55 -0700 Subject: 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> --- source/slangc/main.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source/slangc/main.cpp') 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)) -- cgit v1.2.3