diff options
Diffstat (limited to 'source/compiler-core/slang-downstream-compiler.cpp')
| -rw-r--r-- | source/compiler-core/slang-downstream-compiler.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/compiler-core/slang-downstream-compiler.cpp b/source/compiler-core/slang-downstream-compiler.cpp index 104f1e631..b312f9cb8 100644 --- a/source/compiler-core/slang-downstream-compiler.cpp +++ b/source/compiler-core/slang-downstream-compiler.cpp @@ -68,11 +68,17 @@ void* DownstreamCompilerBase::getObject(const Guid& guid) SlangResult CommandLineDownstreamCompiler::compile(const CompileOptions& inOptions, IArtifact** outArtifact) { + if (!isVersionCompatible(inOptions)) + { + // Not possible to compile with this version of the interface. + return SLANG_E_NOT_IMPLEMENTED; + } + + CompileOptions options = getCompatibleVersion(&inOptions); + // Copy the command line options CommandLine cmdLine(m_cmdLine); - CompileOptions options(inOptions); - // Work out the ArtifactDesc const auto targetDesc = ArtifactDescUtil::makeDescForCompileTarget(options.targetType); |
