win32: adjust new unicode support
commit096125d963400951e0f160ced86416ef8c9c98b0
authorgrischka <grischka>
Sat, 18 Feb 2017 08:51:23 +0000 (18 09:51 +0100)
committergrischka <grischka>
Sat, 18 Feb 2017 08:51:23 +0000 (18 09:51 +0100)
treec0fb4737ba1cf421032e28925f9aef6c140d97aa
parent39b2afeb7c5c7de9a6c6457b5a4ec102d4e364b1
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)
Changelog
lib/Makefile
libtcc.c
tccpe.c
tccrun.c
tests/tests2/Makefile
win32/build-tcc.bat
win32/lib/crt1.c
win32/lib/crt1w.c [new file with mode: 0644]
win32/lib/wincrt1.c
win32/lib/wincrt1w.c [new file with mode: 0644]