summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-options.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-options.cpp')
-rw-r--r--source/slang/slang-options.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp
index c269b10c4..68f538508 100644
--- a/source/slang/slang-options.cpp
+++ b/source/slang/slang-options.cpp
@@ -820,7 +820,11 @@ void initCommandOptions(CommandOptions& options)
"-verify-debug-serial-ir",
nullptr,
"Verify IR in the front-end."},
- {OptionKind::DumpModule, "-dump-module", nullptr, "Disassemble and print the module IR."}};
+ {OptionKind::DumpModule, "-dump-module", nullptr, "Disassemble and print the module IR."},
+ {OptionKind::EmitSeparateDebug,
+ "-separate-debug-info",
+ nullptr,
+ "Emit debug data to a separate file, and strip it from the main output file."}};
_addOptions(makeConstArrayView(debuggingOpts), options);
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Experimental !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
@@ -3079,6 +3083,14 @@ SlangResult OptionsParser::_parse(int argc, char const* const* argv)
break;
}
+ case OptionKind::EmitSeparateDebug:
+ {
+ // This will emit a separate debug file, containing all debug info in
+ // a .dbg.spv file. The main output SPIRV will have all debug info stripped.
+ m_compileRequest->setDebugInfoLevel(SLANG_DEBUG_INFO_LEVEL_MAXIMAL);
+ linkage->m_optionSet.set(OptionKind::EmitSeparateDebug, true);
+ break;
+ }
default:
{
// Hmmm, we looked up and produced a valid enum, but it wasn't handled in the