diff options
| author | kaizhangNV <149626564+kaizhangNV@users.noreply.github.com> | 2024-04-11 21:54:05 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-11 21:54:05 -0700 |
| commit | 1afb9cb43d3ab3d55ac5125ef8b5e6cd482f3f85 (patch) | |
| tree | 5d8430b8e5c87a42bccfe02d5f3f4e2b773f003c /source/slang/slang-options.cpp | |
| parent | 2a5d126c32d459c9ed6cec005b2a4351e18ed04b (diff) | |
Fix the issues when compiling slang to library (#3936)
Diffstat (limited to 'source/slang/slang-options.cpp')
| -rw-r--r-- | source/slang/slang-options.cpp | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp index e3ccec36a..d9441e6da 100644 --- a/source/slang/slang-options.cpp +++ b/source/slang/slang-options.cpp @@ -990,17 +990,11 @@ void OptionsParser::addOutputPath(char const* inPath) ext == toSlice("zip")) { // These extensions don't indicate a artifact container, just that we want to emit IR - if (ext == toSlice("slang-module") || - ext == toSlice("slang-lib")) - { - // We want to emit IR - m_requestImpl->m_emitIr = true; - } - else - { - // We want to write out in an artfact "container", that can hold multiple artifacts. - m_compileRequest->setOutputContainerFormat(SLANG_CONTAINER_FORMAT_SLANG_MODULE); - } + // We want to emit IR + m_requestImpl->m_emitIr = true; + + // We want to write out in an artfact "container", that can hold multiple artifacts. + m_compileRequest->setOutputContainerFormat(SLANG_CONTAINER_FORMAT_SLANG_MODULE); m_requestImpl->m_containerOutputPath = path; } @@ -2525,11 +2519,7 @@ SlangResult OptionsParser::_parse( // If there are no targets and no outputs if (m_rawOutputs.getCount() == 0) { - // And we have a container for output, then enable emitting SlangIR module - if (m_requestImpl->m_containerFormat != ContainerFormat::None) - { - m_requestImpl->m_emitIr = true; - } + m_requestImpl->m_emitIr = true; } else { |
