From deb638f446863ab38248a9568553a1eab47ca086 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Wed, 20 Oct 2021 10:32:50 -0400 Subject: Selecting downstream compiler on code gen transition (#1980) * #include an absolute path didn't work - because paths were taken to always be relative. * Add support for LLVM for host callable. Added CodeGenTransitionMap. * Remove hack to enable host callable for LLVM. * Small improvements around transitions/downstream compiler. * Fix typo in method name. * Fix comment. --- source/compiler-core/slang-downstream-compiler.cpp | 28 ---------------------- 1 file changed, 28 deletions(-) (limited to 'source/compiler-core/slang-downstream-compiler.cpp') diff --git a/source/compiler-core/slang-downstream-compiler.cpp b/source/compiler-core/slang-downstream-compiler.cpp index 9312554ae..daf31c9eb 100644 --- a/source/compiler-core/slang-downstream-compiler.cpp +++ b/source/compiler-core/slang-downstream-compiler.cpp @@ -185,20 +185,6 @@ SlangResult DownstreamCompiler::disassemble(SlangCompileTarget sourceBlobTarget, return (info.sourceLanguageFlags & (SourceLanguageFlags(1) << int(sourceLanguage))) != 0; } -/* static */SlangCompileTarget DownstreamCompiler::getCompileTarget(SlangSourceLanguage sourceLanguage) -{ - switch (sourceLanguage) - { - case SLANG_SOURCE_LANGUAGE_HLSL: return SLANG_HLSL; - case SLANG_SOURCE_LANGUAGE_GLSL: return SLANG_GLSL; - case SLANG_SOURCE_LANGUAGE_C: return SLANG_C_SOURCE; - case SLANG_SOURCE_LANGUAGE_CPP: return SLANG_CPP_SOURCE; - case SLANG_SOURCE_LANGUAGE_CUDA: return SLANG_CUDA_SOURCE; - - default: return SLANG_TARGET_UNKNOWN; - } -} - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! DownstreamDiagnostics !!!!!!!!!!!!!!!!!!!!!!*/ Index DownstreamDiagnostics::getCountAtLeastSeverity(Diagnostic::Severity severity) const @@ -719,20 +705,6 @@ const DownstreamCompiler::Desc& DownstreamCompilerUtil::getCompiledWithDesc() case SLANG_SOURCE_LANGUAGE_CPP: case SLANG_SOURCE_LANGUAGE_C: { - -#if 0 - // TODO(JS): We can't just enable this because we can currently only use slang-llvm, if we want to 'host-callable' - // It *can't* handle pass through (the includes are not available with just the dll), - // As it stands it doesn't support ext/obj/shared library output - - // If we have LLVM, lets use that as the default - { - DownstreamCompiler::Desc desc; - desc.type = SLANG_PASS_THROUGH_LLVM; - compiler = findCompiler(set, MatchType::Newest, desc); - } -#endif - // Find the compiler closest to the compiler this was compiled with if (!compiler) { -- cgit v1.2.3