diff options
author | David Schleef <ds@schleef.org> | 2010-10-13 19:27:19 -0700 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2010-10-13 19:27:19 -0700 |
commit | f3db0f44c9d53cd7e0df3499c09f5a0020d85ef4 (patch) | |
tree | 3587b389556b7e14b9762fd9fba65652ebb04ba7 /tools | |
parent | 60ed0e5c7ad6bf73240e2614a55d0742890a479c (diff) | |
download | orc-f3db0f44c9d53cd7e0df3499c09f5a0020d85ef4.tar.gz |
orcc: Allow normal compilation with no target
Diffstat (limited to 'tools')
-rw-r--r-- | tools/orcc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/orcc.c b/tools/orcc.c index 84a44fa..f6a3f3a 100644 --- a/tools/orcc.c +++ b/tools/orcc.c @@ -167,7 +167,7 @@ main (int argc, char *argv[]) exit (1); } - if (orc_target_get_by_name (target) == NULL) { + if (mode == MODE_ASSEMBLY && orc_target_get_by_name (target) == NULL) { printf("Unknown target \"%s\"\n", target); exit (1); } @@ -1153,7 +1153,7 @@ output_code_assembly (OrcProgram *p, FILE *output) OrcCompileResult result; OrcTarget *t = orc_target_get_by_name(target); - result = orc_program_compile_full (p, orc_target_get_by_name(target), + result = orc_program_compile_full (p, t, orc_target_get_default_flags (t)); if (ORC_COMPILE_RESULT_IS_SUCCESSFUL(result)) { fprintf(output, "%s\n", orc_program_get_asm_code (p)); |