From 99bc31fdd6fd9a6cbce6afd5fa9b52fb47873f61 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 10 May 2023 14:10:53 -0700 Subject: Add slangc options for reporting downstream compile time. (#2878) * Add slangc options for reporting downstream compile time. * Update doc. --------- Co-authored-by: Yong He --- source/slang/slang-options.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source/slang/slang-options.cpp') diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp index cb04632cc..f69e0ec3a 100644 --- a/source/slang/slang-options.cpp +++ b/source/slang/slang-options.cpp @@ -70,6 +70,7 @@ enum class OptionKind DumpWarningDiagnostics, InputFilesRemain, EmitIr, + ReportDownstreamTime, // Target @@ -413,7 +414,8 @@ void initCommandOptions(CommandOptions& options) { OptionKind::EnableWarning, "-W...", "-W", "Enable a warning with the specified id."}, { OptionKind::DisableWarning, "-Wno-...", "-Wno-", "Disable warning with "}, { OptionKind::DumpWarningDiagnostics, "-dump-warning-diagnostics", nullptr, "Dump to output list of warning diagnostic numeric and name ids." }, - { OptionKind::InputFilesRemain, "--", nullptr, "Treat the rest of the command line as input files."} + { OptionKind::InputFilesRemain, "--", nullptr, "Treat the rest of the command line as input files."}, + { OptionKind::ReportDownstreamTime, "-report-downstream-time", nullptr, "Reports the time spent in the downstream compiler." }, }; _addOptions(makeConstArrayView(generalOpts), options); @@ -1838,6 +1840,11 @@ SlangResult OptionsParser::_parse( } break; } + case OptionKind::ReportDownstreamTime: + { + m_compileRequest->setReportDownstreamTime(true); + break; + } case OptionKind::ModuleName: { CommandLineArg moduleName; -- cgit v1.2.3