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)
This commit is contained in:
grischka
2017-02-18 09:51:23 +01:00
parent 39b2afeb7c
commit 096125d963
11 changed files with 55 additions and 47 deletions

View File

@ -17,6 +17,7 @@ Platforms:
- provide a runtime library for ARM (Thomas Preud'homme)
- many x86-64 ABI fixes incl. XMM register passing and tests (James Lyon)
- ABI tests with native compiler using libtcc (James Lyon)
- UNICODE startup code supports wmain and wWinMain (YX Hao)
Features:
- VLA (variable length array) improved (James Lyon, Pip Cet)