summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-options.cpp
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2023-03-17 11:05:15 -0400
committerGitHub <noreply@github.com>2023-03-17 11:05:15 -0400
commit8a61b9dd0ca729df894dad4c89c6ce3bf39ef0be (patch)
treeb7f3da5d30772ba1497f14cdeb39935225183bbb /source/slang/slang-options.cpp
parent9476d4543f4336a66308e55f722b0b0b2bd69dd2 (diff)
Support for producing SourceMap on emit (#2707)
* #include an absolute path didn't work - because paths were taken to always be relative. * WIP source map. * Split out handling of RttiTypeFuncs to a map type. * Make RttiTypeFuncsMap hold default impls. * Slightly more sophisticated RttiTypeFuncsMap * Source map decoding. * Fix tabs. * Fix asserts due to negative values. * Use less obscure mechanisms in SourceMap. * Source map decoding. Simplifying SourceMap usage. * First attempt at ouputting a source map as part of emit. * Added support for -source-map option. SourceMap is added to the artifact.
Diffstat (limited to 'source/slang/slang-options.cpp')
-rw-r--r--source/slang/slang-options.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp
index 944162acc..f6932b9e0 100644
--- a/source/slang/slang-options.cpp
+++ b/source/slang/slang-options.cpp
@@ -669,6 +669,7 @@ struct OptionsParser
" -save-stdlib-bin-source <filename>: Same as -save-stdlib but output\n"
" the data as a C array.\n"
" -track-liveness: Enable liveness tracking. Places SLANG_LIVE_START, and SLANG_LIVE_END in output source to indicate value liveness.\n"
+ " -source-map: Enables outputting of a source map. Note this is *distinct* from line-directive-mode.\n"
"\n"
"Deprecated options (allowed but ignored; may be removed in future):\n"
"\n"
@@ -1176,6 +1177,10 @@ struct OptionsParser
{
getCurrentTarget()->targetFlags |= SLANG_TARGET_FLAG_PARAMETER_BLOCKS_USE_REGISTER_SPACES;
}
+ else if(argValue == "-source-map")
+ {
+ requestImpl->getLinkage()->m_generateSourceMap = true;
+ }
else if (argValue == "-ir-compression")
{
CommandLineArg name;