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

[release-1.9] Avoid usage of jl_error() in check_cmdline() #49486

Merged
merged 1 commit into from
Apr 24, 2023
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
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