Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hipcc exit code when failing #1117

Merged
merged 1 commit into from
May 24, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion bin/hipcc
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,21 @@ if ($runCmd) {
print ("HIP ($HIP_PATH) was built using hcc $hipConfig{'HCC_VERSION'}, but you are using $HCC_HOME/hcc with version $HCC_VERSION from hipcc. Please rebuild HIP including cmake or update HCC_HOME variable.\n") ;
die unless $ENV{'HIP_IGNORE_HCC_VERSION'};
}
system ("$CMD") or delete_temp_dirs () and die ();
system ("$CMD");
if ($? == -1) {
print "failed to execute: $!\n";
exit($?);
}
elsif ($? & 127) {
printf "child died with signal %d, %s coredump\n",
($? & 127), ($? & 128) ? 'with' : 'without';
exit($?);
}
else {
$CMD_EXIT_CODE = $? >> 8;
}
$? or delete_temp_dirs ();
exit($CMD_EXIT_CODE);
}

# vim: ts=4:sw=4:expandtab:smartindent