summaryrefslogtreecommitdiffstats
path: root/source/slangc
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-03-26 13:59:11 -0700
committerGitHub <noreply@github.com>2023-03-26 13:59:11 -0700
commitd64ee86a3130f8eeb75d09193c38c621d7565eba (patch)
treefed25a0cc2a7372d26175774f5983bed693e6b64 /source/slangc
parent666af0962b6ab41489a3a3287db83f77c2f6461a (diff)
Add PyTorch C++ binding generation. (#2734)
* Add PyTorch C++ binding generation. * fix --------- Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slangc')
-rw-r--r--source/slangc/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/slangc/main.cpp b/source/slangc/main.cpp
index 2870a5a3c..2fe9d19a1 100644
--- a/source/slangc/main.cpp
+++ b/source/slangc/main.cpp
@@ -79,15 +79,15 @@ SLANG_TEST_TOOL_API SlangResult innerMain(StdWriters* stdWriters, slang::IGlobal
if (TestToolUtil::hasDeferredStdLib(Index(argc - 1), argv + 1))
{
SLANG_RETURN_ON_FAIL(slang_createGlobalSessionWithoutStdLib(SLANG_API_VERSION, session.writeRef()));
- TestToolUtil::setSessionDefaultPreludeFromExePath(argv[0], session);
}
else if (!session)
{
// Just create the global session in the regular way if there isn't one set
SLANG_RETURN_ON_FAIL(slang_createGlobalSession(SLANG_API_VERSION, session.writeRef()));
- TestToolUtil::setSessionDefaultPreludeFromExePath(argv[0], session);
}
+ TestToolUtil::setSessionDefaultPreludeFromExePath(argv[0], session);
+
SlangCompileRequest* compileRequest = spCreateCompileRequest(session);
compileRequest->addSearchPath(Path::getParentDirectory(Path::getExecutablePath()).getBuffer());
SlangResult res = _compile(compileRequest, argc, argv);