diff options
| author | Yong He <yonghe@outlook.com> | 2023-05-10 14:10:53 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-10 14:10:53 -0700 |
| commit | 99bc31fdd6fd9a6cbce6afd5fa9b52fb47873f61 (patch) | |
| tree | ae6f8c301c771f5a27d1f775729a4fc759f1d804 /source/slang/slang-options.cpp | |
| parent | c8e6a6452f4e531dca09152178bae2f9a2fb999a (diff) | |
Add slangc options for reporting downstream compile time. (#2878)
* Add slangc options for reporting downstream compile time.
* Update doc.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-options.cpp')
| -rw-r--r-- | source/slang/slang-options.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
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<id>", "Enable a warning with the specified id."}, { OptionKind::DisableWarning, "-Wno-...", "-Wno-<id>", "Disable warning with <id>"}, { 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; |
