diff options
Diffstat (limited to 'source/slang/options.cpp')
| -rw-r--r-- | source/slang/options.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/slang/options.cpp b/source/slang/options.cpp index 79832a9c3..971d17b51 100644 --- a/source/slang/options.cpp +++ b/source/slang/options.cpp @@ -223,6 +223,11 @@ struct OptionsParser #undef CASE + else if (path.EndsWith(".slang-module")) + { + spSetOutputContainerFormat(compileRequest, SLANG_CONTAINER_FORMAT_SLANG_MODULE); + requestImpl->containerOutputPath = path; + } else { // Allow an unknown-format `-o`, assuming we get a target format @@ -600,6 +605,16 @@ struct OptionsParser } } + // If the user is requesting multiple targets, *and* is asking + // for direct output files for entry points, that is an error. + if (rawOutputPaths.Count() != 0 && requestImpl->targets.Count() > 1) + { + requestImpl->mSink.diagnose( + SourceLoc(), + Diagnostics::explicitOutputPathsAndMultipleTargets); + } + + // Did the user try to specify output path(s)? if (rawOutputPaths.Count() != 0) { |
