Skip to content

Commit

Permalink
Merge pull request #49486 from JuliaLang/sf/backport_win_hang_fix
Browse files Browse the repository at this point in the history
[release-1.9] Avoid usage of `jl_error()` in `check_cmdline()`
  • Loading branch information
staticfloat committed Apr 24, 2023
2 parents a666aab + 3f42af0 commit 0a374d5
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -739,20 +739,24 @@ static inline void check_cmdline(T &&cmdline, bool imaging)
// sysimg means. Make it an error for now.
if (!imaging) {
if (cmdline.size() > 1) {
jl_error("More than one command line CPU targets specified "
"without a `--output-` flag specified");
jl_safe_printf("More than one command line CPU targets specified "
"without a `--output-` flag specified");
exit(1);
}
if (cmdline[0].en.flags & JL_TARGET_CLONE_ALL) {
jl_error("\"clone_all\" feature specified "
"without a `--output-` flag specified");
jl_safe_printf("\"clone_all\" feature specified "
"without a `--output-` flag specified");
exit(1);
}
if (cmdline[0].en.flags & JL_TARGET_OPTSIZE) {
jl_error("\"opt_size\" feature specified "
"without a `--output-` flag specified");
jl_safe_printf("\"opt_size\" feature specified "
"without a `--output-` flag specified");
exit(1);
}
if (cmdline[0].en.flags & JL_TARGET_MINSIZE) {
jl_error("\"min_size\" feature specified "
"without a `--output-` flag specified");
jl_safe_printf("\"min_size\" feature specified "
"without a `--output-` flag specified");
exit(1);
}
}
}
Expand Down

0 comments on commit 0a374d5

Please sign in to comment.