diff options
| author | grischka <grischka> | 2017-02-13 19:03:29 +0100 |
|---|---|---|
| committer | grischka <grischka> | 2017-02-13 19:03:29 +0100 |
| commit | 43d9a7de9b83f437d55c2cbc6e9625e3fafa5102 (patch) | |
| tree | 5890bbdeebd2bec986afd99f51f624c652a915a9 /win32/build-tcc.bat | |
| parent | 13056da039240a1d418335f6e0506a89fb2d8495 (diff) | |
| download | tinycc-43d9a7de9b83f437d55c2cbc6e9625e3fafa5102.tar.gz tinycc-43d9a7de9b83f437d55c2cbc6e9625e3fafa5102.tar.bz2 | |
updates & cleanups (tcc-doc/Changelog/TODO ...)
- tcc-doc.texi: commandline option info update
- Changelog/TODO: update
- tests/tcctest.py: removed
- tests/Makefile: weaktest fixed
- tests/tests2: some files renamed and/or converted to unix LF
- configure/Makefile: --enable-static option (no dll on win32)
- win32/build-tcc.bat: msvc support
- win32/tcc-win32.txt: build info update
- win32/vs2015/: VS solution removed
- win32/include/tcc/tcc_libm.h: #include statement fixed
- tcc.c: -include <file> option help info
- .gitignore: cleanup
Diffstat (limited to 'win32/build-tcc.bat')
| -rw-r--r-- | win32/build-tcc.bat | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/win32/build-tcc.bat b/win32/build-tcc.bat index 0598119..77c0067 100644 --- a/win32/build-tcc.bat +++ b/win32/build-tcc.bat @@ -1,10 +1,11 @@ @rem ------------------------------------------------------ -@rem batch file to build tcc using mingw gcc or tcc itself +@rem batch file to build tcc using mingw, msvc or tcc itself @rem ------------------------------------------------------ @echo off -set CC=gcc -Os -s -fno-strict-aliasing +set CC=gcc -Os -s + set T=32 if %PROCESSOR_ARCHITECTURE%_==AMD64_ set T=64 if %PROCESSOR_ARCHITEW6432%_==AMD64_ set T=64 @@ -16,7 +17,7 @@ goto :a0 :usage echo usage: build-tcc.bat [ options ... ] echo options: -echo -c prog use prog (gcc or tcc) to compile tcc +echo -c prog use prog (gcc/tcc/cl) to compile tcc echo -c "prog options" use prog with options to compile tcc echo -t 32/64 force 32/64 bit default target echo -v "version" set tcc version @@ -24,6 +25,21 @@ echo -i dir install tcc into dir echo -d create tcc-doc.html too (needs makeinfo) exit /B 1 +:cl +@echo off +set CMD=cl +:c0 +set ARG=%1 +set ARG=%ARG:.dll=.lib% +if (%1)==(-shared) set ARG=-LD +if (%1)==(-o) shift && set ARG=-Fe%2 +set CMD=%CMD% %ARG% +shift +if not (%1)==() goto :c0 +echo on +%CMD% -O1 -W2 -Zi -MT -GS- -nologo -link -opt:ref,icf +@exit /B %ERRORLEVEL% + :a2 shift :a1 @@ -31,6 +47,7 @@ shift :a0 if not (%1)==(-c) goto :a3 set CC=%~2 +if (%2)==(cl) set CC=@call :cl goto :a2 :a3 if not (%1)==(-t) goto :a4 |
