Merge pull request #4637 from roc-lang/check-link-exit-status

check the exit status of the link cmd
This commit is contained in:
Richard Feldman 2022-11-30 12:09:14 -05:00 committed by GitHub
commit da158bca19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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();