diff options
Diffstat (limited to 'source/slang/slang-emit.cpp')
| -rw-r--r-- | source/slang/slang-emit.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/slang/slang-emit.cpp b/source/slang/slang-emit.cpp index f4db3c5c1..710c1731f 100644 --- a/source/slang/slang-emit.cpp +++ b/source/slang/slang-emit.cpp @@ -581,8 +581,9 @@ String emitEntryPointSource( // If generic CPP work out what compiler will actually be used if (passThru == PassThroughMode::GenericCCpp) { - CPPCompilerSet* compilerSet = session->requireCPPCompilerSet(); - CPPCompiler* compiler = compilerSet->getDefaultCompiler(); + const SourceLanguage sourceLanguage = (sourceStyle == SourceStyle::C) ? SourceLanguage::C : SourceLanguage::CPP; + // Get the compiler used for the language + CPPCompiler* compiler = session->getDefaultCPPCompiler(sourceLanguage); if (compiler) { passThru = getPassThroughModeForCPPCompiler(compiler->getDesc().type); |
