check the exit status of the link cmd

This commit is contained in:
Anton-4 2022-11-29 16:53:04 +01:00
parent f9393768f2
commit 0b98609a22
No known key found for this signature in database
GPG key ID: A13F4A6E21141925

View file

@ -1491,7 +1491,14 @@ pub fn llvm_module_to_dylib(
)
.unwrap();
child.wait().unwrap();
let exit_status = child.wait().unwrap();
assert!(
exit_status.success(),
"\n___________\nLinking command failed with status {:?}:\n\n {:?}\n___________\n",
exit_status,
child
);
// Load the dylib
let path = dylib_path.as_path().to_str().unwrap();