mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-08 20:56:13 +00:00
wamrc: return a non-zero exit code on failure (#822)
This commit is contained in:
parent
69c004efb4
commit
d1be75c4a1
|
@ -84,6 +84,7 @@ main(int argc, char *argv[])
|
||||||
char error_buf[128];
|
char error_buf[128];
|
||||||
int log_verbose_level = 2;
|
int log_verbose_level = 2;
|
||||||
bool sgx_mode = false;
|
bool sgx_mode = false;
|
||||||
|
int exit_status = EXIT_FAILURE;
|
||||||
|
|
||||||
option.opt_level = 3;
|
option.opt_level = 3;
|
||||||
option.size_level = 3;
|
option.size_level = 3;
|
||||||
|
@ -296,6 +297,7 @@ main(int argc, char *argv[])
|
||||||
bh_print_time("Compile end");
|
bh_print_time("Compile end");
|
||||||
|
|
||||||
printf("Compile success, file %s was generated.\n", out_file_name);
|
printf("Compile success, file %s was generated.\n", out_file_name);
|
||||||
|
exit_status = EXIT_SUCCESS;
|
||||||
|
|
||||||
fail5:
|
fail5:
|
||||||
/* Destroy compiler context */
|
/* Destroy compiler context */
|
||||||
|
@ -318,5 +320,5 @@ fail1:
|
||||||
wasm_runtime_destroy();
|
wasm_runtime_destroy();
|
||||||
|
|
||||||
bh_print_time("wamrc return");
|
bh_print_time("wamrc return");
|
||||||
return 0;
|
return exit_status;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user