From 27ce5eb0de9f792f3e433bcb239c07d79371cf45 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Fri, 10 Sep 2021 16:31:26 -0400 Subject: First Slang LLVM integration (#1934) * #include an absolute path didn't work - because paths were taken to always be relative. * First integration with 'slang-llvm'. * Fix project. * Fix test output. * First pass assert support. * Add inline impls for min and max. * Add abs inline abs impl for llvm. * Make abs not use ternary op * Fix typo in slang-llvm.h * Sundary fixes to make remaining tests using llvm backend pass. --- source/slang/slang-compiler.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/slang/slang-compiler.cpp') diff --git a/source/slang/slang-compiler.cpp b/source/slang/slang-compiler.cpp index 513f9623d..9f10876a0 100644 --- a/source/slang/slang-compiler.cpp +++ b/source/slang/slang-compiler.cpp @@ -480,6 +480,7 @@ namespace Slang { return SourceLanguage::GLSL; } + case PassThroughMode::LLVM: case PassThroughMode::Clang: case PassThroughMode::VisualStudio: case PassThroughMode::Gcc: @@ -493,6 +494,7 @@ namespace Slang { return SourceLanguage::CUDA; } + default: break; } SLANG_ASSERT(!"Unknown compiler"); @@ -1791,6 +1793,13 @@ namespace Slang ComPtr blob; if (SLANG_FAILED(result.getBlob(blob))) { + if (targetReq->getTarget() == CodeGenTarget::HostCallable) + { + // Some HostCallable are not directly representable as a 'binary'. + // So here, we just ignore if that appears the case, and don't output an unexpected error. + return; + } + SLANG_UNEXPECTED("No blob to emit"); return; } -- cgit v1.2.3