summaryrefslogtreecommitdiff
path: root/source/slang/slang-emit.cpp
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2019-12-04 13:49:26 -0500
committerGitHub <noreply@github.com>2019-12-04 13:49:26 -0500
commit1e5ec5ca8c73e91c63b787e69c7286728f510b5e (patch)
tree033d61c6df3b3d9567918a34f56c0fdda23bba80 /source/slang/slang-emit.cpp
parent0b4c1f63226eeff400eaa59be2331f0a480fd7b5 (diff)
Setting downstream compiler (#1144)
* WIP setting downstream compiler. * Setting default downstream compiler for a source type.
Diffstat (limited to 'source/slang/slang-emit.cpp')
-rw-r--r--source/slang/slang-emit.cpp5
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);