aboutsummaryrefslogtreecommitdiff
path: root/tccrun.c
diff options
context:
space:
mode:
authorgrischka <grischka>2017-02-18 09:51:23 +0100
committergrischka <grischka>2017-02-18 09:51:23 +0100
commit096125d963400951e0f160ced86416ef8c9c98b0 (patch)
treec0fb4737ba1cf421032e28925f9aef6c140d97aa /tccrun.c
parent39b2afeb7c5c7de9a6c6457b5a4ec102d4e364b1 (diff)
downloadtinycc-096125d963400951e0f160ced86416ef8c9c98b0.tar.gz
tinycc-096125d963400951e0f160ced86416ef8c9c98b0.tar.bz2
win32: adjust new unicode support
- lib/Makefile: add (win)crt1_w.o - crt1.c/_runtmain: return to tcc & only use for UNICODE (because it might be not 100% reliable with for example wildcards (tcc *.c -run ...) - tccrun.c/tccpe.c: load -run startup_code only if called from tcc_run(). Otherwise main may not be defined. See libtcc_test.c - tests2/Makefile: pass extra options in FLAGS to allow overriding TCC Also: - tccpe.c: support weak attribute. (I first tried to solve the problem above by using it but then didn't)
Diffstat (limited to 'tccrun.c')
-rw-r--r--tccrun.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tccrun.c b/tccrun.c
index 18aed61..950ffb0 100644
--- a/tccrun.c
+++ b/tccrun.c
@@ -107,6 +107,7 @@ LIBTCCAPI int tcc_run(TCCState *s1, int argc, char **argv)
{
int (*prog_main)(int, char **);
+ s1->runtime_main = "main";
if (tcc_relocate(s1, TCC_RELOCATE_AUTO) < 0)
return -1;
prog_main = tcc_get_symbol_err(s1, s1->runtime_main);