File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -405,8 +405,7 @@ HRESULT DxcDllExtValidationLoader::CreateInstance2Impl(
405405HRESULT
406406DxcDllExtValidationLoader::InitializeForDll (LPCSTR dllName, LPCSTR fnName) {
407407 // Load dxcompiler.dll
408- HRESULT Result =
409- DxCompilerSupport.InitializeForDll (kDxCompilerLib , " DxcCreateInstance" );
408+ HRESULT Result = DxCompilerSupport.InitializeForDll (dllName, fnName);
410409 // if dxcompiler.dll fails to load, return the failed HRESULT
411410 if (FAILED (Result)) {
412411 FailureReason = FailedCompilerLoad;
Original file line number Diff line number Diff line change @@ -1456,7 +1456,14 @@ int dxc::main(int argc, const char **argv_) {
14561456 // Setup a helper DLL.
14571457 DxcDllExtValidationLoader dxcSupport;
14581458 {
1459- HRESULT dllResult = dxcSupport.initialize ();
1459+ HRESULT dllResult;
1460+ if (!dxcOpts.ExternalLib .empty () || !dxcOpts.ExternalFn .empty ())
1461+ dllResult =
1462+ dxcSupport.InitializeForDll (dxcOpts.ExternalLib .str ().c_str (),
1463+ dxcOpts.ExternalFn .str ().c_str ());
1464+ else
1465+ dllResult = dxcSupport.initialize ();
1466+
14601467 if (DXC_FAILED (dllResult)) {
14611468 switch (dxcSupport.getFailureReason ()) {
14621469 case dxcSupport.FailedCompilerLoad : {
You can’t perform that action at this time.
0 commit comments