Disable binary generation when deprecated --emit is used

This commit is contained in:
Noam Preil 2020-02-09 20:33:35 -05:00 committed by Andrew Kelley
parent 2502cb242a
commit 9c98c73e73
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9

View File

@ -746,10 +746,12 @@ static int main0(int argc, char **argv) {
} else if (strcmp(arg, "--emit") == 0) {
if (strcmp(argv[i], "asm") == 0) {
emit_asm = true;
disable_bin_generation = true;
} else if (strcmp(argv[i], "bin") == 0) {
disable_bin_generation = false;
} else if (strcmp(argv[i], "llvm-ir") == 0) {
emit_llvm_ir = true;
disable_bin_generation = true;
} else {
fprintf(stderr, "--emit options are 'asm', 'bin', or 'llvm-ir'\n");
return print_error_usage(arg0);