summaryrefslogtreecommitdiff
path: root/source/slang/slang-options.cpp
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2020-11-18 18:12:43 -0500
committerGitHub <noreply@github.com>2020-11-18 18:12:43 -0500
commite140c4950eb8c69606386ca57284c0655513b9e1 (patch)
tree1361dcf8cfc1597b63960226006af301ac82bfc6 /source/slang/slang-options.cpp
parentd898d561e3c76ecf38db434ec7fbb4bbd0e25cb2 (diff)
Test for serializing out and reading back Stdlib (#1605)
* #include an absolute path didn't work - because paths were taken to always be relative. * Mangling/module name extraction for GenericDecl * Add comment on SerialFilter to explain re-enabling Stmt. * Support setting up SyntaxDecl when reconstructed after deserialization. * Improvements to setup SyntaxDecl. * Fix typo so can read compressed SourceLocs. * Fix issue with SourceManger. * Simple test for serializing out stdlib and reading back in. * Fix calling convention. * Add override to StdLib impls. * Fix typo. * Apply testing to an actual compute test when using load-stdlib Make -load/compile-stdlib processable by Slang Move out testing into util into TestToolUtil so can be shared. * Slightly more concise setup of session. * Fix some errors introduced with session handling. * Made setup for compile same across slangc and slangc-tool.
Diffstat (limited to 'source/slang/slang-options.cpp')
-rw-r--r--source/slang/slang-options.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp
index 8897a6549..6a5b43876 100644
--- a/source/slang/slang-options.cpp
+++ b/source/slang/slang-options.cpp
@@ -447,6 +447,18 @@ struct OptionsParser
{
flags |= SLANG_COMPILE_FLAG_NO_MANGLING;
}
+ else if (argStr == "-load-stdlib")
+ {
+ SLANG_RETURN_ON_FAIL(session->loadStdLib());
+ }
+ else if (argStr == "-compile-stdlib")
+ {
+ SLANG_RETURN_ON_FAIL(session->compileStdLib());
+ }
+ else if (argStr == "-save-stdlib")
+ {
+ SLANG_RETURN_ON_FAIL(session->saveStdLib());
+ }
else if (argStr == "-no-codegen")
{
flags |= SLANG_COMPILE_FLAG_NO_CODEGEN;