From c59b82353d70122b59f5bc428be9464f49a99326 Mon Sep 17 00:00:00 2001 From: James Farrell Date: Tue, 13 Jun 2023 16:16:06 +0000 Subject: Better diagnostics for dlltool errors. When dlltool fails, show the full command that was executed. In particular, llvm-dlltool is not very helpful, printing a generic usage message rather than what actually went wrong, so stdout and stderr aren't of much use when troubleshooting. --- compiler/rustc_codegen_llvm/src/errors.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'compiler/rustc_codegen_llvm/src/errors.rs') diff --git a/compiler/rustc_codegen_llvm/src/errors.rs b/compiler/rustc_codegen_llvm/src/errors.rs index 44869ced1ae..fced6d504d2 100644 --- a/compiler/rustc_codegen_llvm/src/errors.rs +++ b/compiler/rustc_codegen_llvm/src/errors.rs @@ -81,6 +81,8 @@ pub(crate) struct ErrorCallingDllTool<'a> { #[derive(Diagnostic)] #[diag(codegen_llvm_dlltool_fail_import_library)] pub(crate) struct DlltoolFailImportLibrary<'a> { + pub dlltool_path: Cow<'a, str>, + pub dlltool_args: String, pub stdout: Cow<'a, str>, pub stderr: Cow<'a, str>, } -- cgit 1.4.1-3-g733a5