aboutsummaryrefslogtreecommitdiff
path: root/tcc.c
diff options
context:
space:
mode:
authorgrischka <grischka>2009-05-11 18:46:02 +0200
committergrischka <grischka>2009-05-11 18:46:02 +0200
commit67aebdd5b733094bffbf23a87da14d2c53937a99 (patch)
tree17521833e98b73b06dd4b39960f30d24997f0971 /tcc.c
parent0a35f9d66e15e7daadc329e7fc34b2fe5a8cbce1 (diff)
downloadtinycc-67aebdd5b733094bffbf23a87da14d2c53937a99.tar.gz
tinycc-67aebdd5b733094bffbf23a87da14d2c53937a99.tar.bz2
enable making tcc using libtcc
Diffstat (limited to 'tcc.c')
-rw-r--r--tcc.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/tcc.c b/tcc.c
index 9cd88f3..3fce608 100644
--- a/tcc.c
+++ b/tcc.c
@@ -509,13 +509,11 @@ int main(int argc, char **argv)
const char *filename;
filename = files[i];
- if (output_type == TCC_OUTPUT_PREPROCESS) {
- if (tcc_add_file_internal(s, filename,
- AFF_PRINT_ERROR | AFF_PREPROCESS) < 0)
+ if (filename[0] == '-' && filename[1]) {
+ if (tcc_add_library(s, filename + 2) < 0) {
+ error_noabort("cannot find %s", filename);
ret = 1;
- } else if (filename[0] == '-' && filename[1]) {
- if (tcc_add_library(s, filename + 2) < 0)
- error("cannot find %s", filename);
+ }
} else {
if (1 == s->verbose)
printf("-> %s\n", filename);