From 1e5ec5ca8c73e91c63b787e69c7286728f510b5e Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Wed, 4 Dec 2019 13:49:26 -0500 Subject: Setting downstream compiler (#1144) * WIP setting downstream compiler. * Setting default downstream compiler for a source type. --- source/slang/slang-emit.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/slang/slang-emit.cpp') 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); -- cgit v1.2.3