summaryrefslogtreecommitdiffstats
path: root/source/slang
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang')
-rw-r--r--source/slang/slang-check.cpp8
-rw-r--r--source/slang/slang-compiler.cpp9
-rwxr-xr-xsource/slang/slang-compiler.h3
3 files changed, 13 insertions, 7 deletions
diff --git a/source/slang/slang-check.cpp b/source/slang/slang-check.cpp
index 55306a0da..74e30cf8d 100644
--- a/source/slang/slang-check.cpp
+++ b/source/slang/slang-check.cpp
@@ -12,12 +12,7 @@
namespace Slang
{
namespace { // anonymous
- struct FunctionInfo
- {
- const char* name;
- PassThroughMode compilerType;
- };
-
+
class SinkSharedLibraryLoader : public RefObject, public ISlangSharedLibraryLoader
{
public:
@@ -101,6 +96,7 @@ namespace Slang
getOrLoadDownstreamCompiler(PassThroughMode::Clang, sink);
getOrLoadDownstreamCompiler(PassThroughMode::Gcc, sink);
getOrLoadDownstreamCompiler(PassThroughMode::VisualStudio, sink);
+ getOrLoadDownstreamCompiler(PassThroughMode::LLVM, sink);
}
// Mark that we have tried to load it
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<ISlangBlob> 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;
}
diff --git a/source/slang/slang-compiler.h b/source/slang/slang-compiler.h
index 4ed30ed28..a7903dd5a 100755
--- a/source/slang/slang-compiler.h
+++ b/source/slang/slang-compiler.h
@@ -979,7 +979,8 @@ namespace Slang
VisualStudio = SLANG_PASS_THROUGH_VISUAL_STUDIO, ///< Visual studio compiler
Gcc = SLANG_PASS_THROUGH_GCC, ///< Gcc compiler
GenericCCpp = SLANG_PASS_THROUGH_GENERIC_C_CPP, ///< Generic C/C++ compiler
- NVRTC = SLANG_PASS_THROUGH_NVRTC,
+ NVRTC = SLANG_PASS_THROUGH_NVRTC, ///< NVRTC CUDA compiler
+ LLVM = SLANG_PASS_THROUGH_LLVM, ///< LLVM 'compiler'
CountOf = SLANG_PASS_THROUGH_COUNT_OF,
};
void printDiagnosticArg(StringBuilder& sb, PassThroughMode val);