tinycc/win32
Avi Halachmi (:avih) 100f94be99 tiny_libmaker: more robust arguments interpretation
- Syntax is now much closer to gnu ar, but still supports whatever was
  supported before, with the following exceptions (which gnu ar has too):
  - lib is now mandatory (was optional and defaulted to ar_test.a before).
  - Path cannot start with '-' (but ./-myfile.o is OK).
- Unlike gnu ar, modes are still optional (as before).
- Now supports also (like gnu ar):
  - First argument as options doesn't have to start with '-', later options do.
  - Now supports mode v (verbose) with same output format as gnu ar.
  - Any names for lib/objs (were limited to .a/.o - broke cmake on windows).
  - Now explicitly fail on options which would be destructive for the user.
  - Now doesn't get confused by options between file arguments.
- Still ignores other unknown options - as before.
- Now doesn't read out-of-bounds if an option is one char.

- As a result, cmake for windows can now use tiny_libmaker as ar, and
  configure can also detect tiny_libmaker as a valid ar (both couldn't before).

Ignoring all options could previously cause to misinterpret the mode in a
destructive way, e.g. if the user wanted to do something with an existing
archive (such as p - print, or x - extract, etc), then it would instead just
delete (re-create) the archive.

Modes which can be destructive if ignored now explicitly fail. These include
[habdioptxN]. Note that 'h' can be ignored, but this way we also implicitly
print the usage for -h/--help.

The .a/.o name limitations previously resulted in complete failure on some
cases, such as cmake on windows which uses <filename>.obj and <libname>.lib .

Fixed: e.g. 'tiny_libmaker r x.a x.o' was reading out of bounds [-1] for 'r'.
2016-06-19 14:43:46 +03:00
..
examples Add a demo.bat file to the examples directory on Windows 2015-04-10 07:46:04 +03:00
include tccgen: scopes levels for local symbols (update 1) 2016-05-05 20:04:00 +02:00
lib win32: Add missing header files for nginx compilation 2016-04-13 06:51:59 +03:00
tools tiny_libmaker: more robust arguments interpretation 2016-06-19 14:43:46 +03:00
vs2015 win32: Better VS2015 solution and project files 2016-04-13 11:10:13 +03:00
build-tcc.bat VS2015 solution and project files 2016-04-13 06:29:24 +03:00
tcc-win32.txt i386-gen: preserve fp control word in gen_cvt_ftoi 2013-08-28 22:55:05 +02:00