diff options
| -rw-r--r-- | tomo.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -65,9 +65,12 @@ int main(int argc, char *argv[]) if (!cconfig) cconfig = "-std=c11 -fdollars-in-identifiers -fsanitize=signed-integer-overflow -fno-sanitize-recover -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -D_DEFAULT_SOURCE"; + const char *optimization = getenv("O"); + if (!optimization) optimization = "-O1"; + cflags = getenv("CFLAGS"); if (!cflags) - cflags = heap_strf("%s -I. -D_DEFAULT_SOURCE", cconfig); + cflags = heap_strf("%s %s -I. -D_DEFAULT_SOURCE", cconfig, optimization); ldlibs = "-lgc -lcord -lm -L. -ltomo"; if (getenv("LDLIBS")) @@ -227,7 +230,6 @@ int transpile(const char *filename, bool force_retranspile) printf("Transpiled to %s.c\n", f->filename); } - if (verbose) { FILE *out = popen(heap_strf("bat -P %s.h %s.c", f->filename, f->filename), "w"); CORD_put(module.header, out); |
