From 0db6e249293b85338acb77f8858c823422949c3f Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Wed, 16 Jan 2019 21:49:38 -0500 Subject: Not finding dxil no longer an error. Outputs a warning. (#781) * * Allow dxc compilation to take place if dxil is not found. * Output a warning that output will not be signed. * Remove .dll from dxil in warning so more applicable cross platform. --- source/slang/dxc-support.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source/slang/dxc-support.cpp') diff --git a/source/slang/dxc-support.cpp b/source/slang/dxc-support.cpp index 7fe22191b..7d2d6dc0c 100644 --- a/source/slang/dxc-support.cpp +++ b/source/slang/dxc-support.cpp @@ -64,6 +64,17 @@ namespace Slang return SLANG_FAIL; } + { + if (!session->getSharedLibrary(SharedLibraryType::Dxil)) + { + // If can't load dxil - dxc will not be able to sign output + // Output a suitable warning to the user + auto& sink = entryPoint->compileRequest->mSink; + + sink.diagnose(SourceLoc(), Diagnostics::dxilNotFound); + } + } + ComPtr dxcCompiler; SLANG_RETURN_ON_FAIL(dxcCreateInstance( CLSID_DxcCompiler, -- cgit v1.2.3