aboutsummaryrefslogtreecommitdiff
path: root/libtcc.h
Commit message (Collapse)AuthorAgeFilesLines
* libtcc: filetype cleanupgrischka2016-10-011-5/+1
| | | | - does not change signature of tcc_add_file
* libtcc: cleanup -x<filetype> switch codegrischka2016-10-011-4/+4
| | | | | Abusing filename[0] as type is just too much of a hack. -- From 05364072042ff37904a7b0b14cdd85a1ea1ca11d
* Revert "--whole-archive support"grischka2016-10-011-2/+0
| | | | | | | | | | | | - would parse linker args in two different places - would mess up "tcc -v ..." output: tcc -v test.c -> test.c +> test.c - would use function "tcc_load_alacarte()" to do the contrary of what its name suggests. This reverts commit 19a169ceb896f78205bc23b847938c58f14d1dda.
* --whole-archive supportseyko2016-05-201-0/+2
| | | | | | | | | | | | | | | A patch is implemented as suggested in tinycc-devel mail list. From: Reuben Thomas Date: Thu, 31 Jul 2014 16:52:53 +0100 Subject: [PATCH] Add --{no,}-whole-archive support I resurrected the patch supplied to the mailing list in 2009 Since --whole-archive is a useful flag to get tcc working with autotools, and of course in its own right, I suggest you have a look at the patch and see if it is acceptable. I cannot see any suggestion that it was actively rejected last time round, just no evidence that it was ever added.
* Revert all of my changes to directories & codingstyle.gus knight2015-07-291-0/+104
|
* Reorganize the source tree.gus knight2015-07-271-104/+0
| | | | | | | | | | * Documentation is now in "docs". * Source code is now in "src". * Misc. fixes here and there so that everything still works. I think I got everything in this commit, but I only tested this on Linux (Make) and Windows (CMake), so I might've messed something up on other platforms...
* ability to specify a type of the input file with the -x switchseyko2015-04-121-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Usage example: tcc -xc ex5.cgi From a gcc docs: You can specify the input language explicitly with the -x option: -x language Specify explicitly the language for the following input files (rather than letting the compiler choose a default based on the file name suffix). This option applies to all following input files until the next -x option. Possible values for language are: c c-header c-cpp-output c++ c++-header c++-cpp-output objective-c objective-c-header objective-c-cpp-output objective-c++ objective-c++-header objective-c++-cpp-output assembler assembler-with-cpp ada f77 f77-cpp-input f95 f95-cpp-input java -x none Turn off any specification of a language, so that subsequent files are handled according to their file name suffixes (as they are if -x has not been used at all)
* Warn about a conflicting compile options spectified on the command line.seyko2015-01-061-5/+5
| | | | Try "tcc -E -c tccasm.c -o tccasm.o"
* libtcc: new LIBTCCAPI tcc_set_options(TCCState*, const char*str)grischka2013-02-121-27/+14
| | | | | | | | | | | | | | | | | | | This replaces -> use instead: ----------------------------------- - tcc_set_linker -> tcc_set_options(s, "-Wl,..."); - tcc_set_warning -> tcc_set_options(s, "-W..."); - tcc_enable_debug -> tcc_set_options(s, "-g"); parse_args is moved to libtcc.c (now tcc_parse_args). Also some cleanups: - reorder TCCState members - add some comments here and there - do not use argv's directly, make string copies - use const char* in tcc_set_linker - tccpe: use fd instead of fp tested with -D MEM_DEBUG: 0 bytes left
* Revert "Added what I call virtual io to tinycc this way we can make a ↵Thomas Preud'homme2013-01-141-29/+0
| | | | | | | | monolitic executable or library that contains all needed to compile programs, truly tinycc portable." This reverts commit 59e18aee0e509a3ca75dbe6f909e18c1d17893d1. tcc is being stabilized now in order to do a new release soon. Therefore, such a change is not appropriate now.
* Added what I call virtual io to tinycc this way we can make a monolitic ↵mingodad2013-01-111-0/+29
| | | | | | executable or library that contains all needed to compile programs, truly tinycc portable. Tested under linux exec the "mk-it" shell script and you'll end up with a portable tinycc executable that doesn't depend on anything else.
* tccrun: another incompatible change to the tcc_relocate APIgrischka2012-09-011-3/+8
| | | | | | We are now compatible with the 0.9,25 version though. A special value for the second (ptr) argument is used to get the simple behavior as with the 0.9.24 version.
* libtcc: minor adjustmentsgrischka2011-08-111-4/+2
| | | | | | | | | | | | | | | | | - use {B} to substitute tcc_lih_path (instead of \b) - expand CONFIG_TCC_CRTPREFIX in CONFIG_TCC_LIBPATHS which fixes duplicate CONFIG_SYSROOT. - put default CONFIG_SYSROOT ("") into tcc.h - remove hack from commit db6fcce78f4d8ea25036dd6643e9fa83d8e52e5a because $(tccdir)/include is already in sysincludes - configure: error out for unrecognized options. - win32/build-tcc.bat: put libtcc into base dir where it will find lib/include automatically, and build libtcc_test example.
* libtcc: cleanup the 'gen_makedeps' stuffgrischka2011-08-061-14/+0
|
* tcc: Draft suppoprt for -MD/-MF optionsKirill Smelkov2010-06-211-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In build systems, this is used to automatically collect target dependencies, e.g. ---- 8< (hello.c) ---- #include "hello.h" #include <stdio.h> int main() { printf("Hello World!\n"); return 0; } $ tcc -MD -c hello.c # -> hello.o, hello.d $ cat hello.d hello.o : \ hello.c \ hello.h \ /usr/include/stdio.h \ /usr/include/features.h \ /usr/include/bits/predefs.h \ /usr/include/sys/cdefs.h \ /usr/include/bits/wordsize.h \ /usr/include/gnu/stubs.h \ /usr/include/bits/wordsize.h \ /usr/include/gnu/stubs-32.h \ /home/kirr/local/tcc/lib/tcc/include/stddef.h \ /usr/include/bits/types.h \ /usr/include/bits/wordsize.h \ /usr/include/bits/typesizes.h \ /usr/include/libio.h \ /usr/include/_G_config.h \ /usr/include/wchar.h \ /home/kirr/local/tcc/lib/tcc/include/stdarg.h \ /usr/include/bits/stdio_lim.h \ /usr/include/bits/sys_errlist.h \ NOTE: gcc supports -MD only for .c -> .o, but in tcc, we generate dependencies for whatever action is being taken. E.g. for .c -> exe, the result will be: $ tcc -MD -o hello hello.c # -> hello, hello.d hello: \ /usr/lib/crt1.o \ /usr/lib/crti.o \ hello.c \ hello.h \ /usr/include/stdio.h \ /usr/include/features.h \ /usr/include/bits/predefs.h \ /usr/include/sys/cdefs.h \ /usr/include/bits/wordsize.h \ /usr/include/gnu/stubs.h \ /usr/include/bits/wordsize.h \ /usr/include/gnu/stubs-32.h \ /home/kirr/local/tcc/lib/tcc/include/stddef.h \ /usr/include/bits/types.h \ /usr/include/bits/wordsize.h \ /usr/include/bits/typesizes.h \ /usr/include/libio.h \ /usr/include/_G_config.h \ /usr/include/wchar.h \ /home/kirr/local/tcc/lib/tcc/include/stdarg.h \ /usr/include/bits/stdio_lim.h \ /usr/include/bits/sys_errlist.h \ /usr/lib/libc.so \ /lib/libc.so.6 \ /usr/lib/ld-linux.so.2 \ /lib/ld-linux.so.2 \ /usr/lib/libc_nonshared.a \ /lib/libc.so.6 \ /usr/lib/libc_nonshared.a \ /home/kirr/local/tcc/lib/tcc/libtcc1.a \ /usr/lib/crtn.o \ So tcc dependency generator is a bit more clever than one used in gcc :) Also, I've updated TODO and Changelog (in not-yet-released section). v2: (Taking inputs from grischka and me myself) - put code to generate deps file into a function. - used tcc_fileextension() instead of open-coding - generate deps only when compilation/preprocessing was successful v3: - use pstrcpy instead of snprintf(buf, sizeof(buf), "%s", ...)
* Add input files/libs and reloc_output switch to TCCStateKirill Smelkov2010-06-201-0/+7
| | | | | | | | | | | | | | | | | files[0], and reloc_outpu will be needed for (upcoming in the next patch) "compute default outfile name" refactored into libtcc function. Also, since for symmetry and from libification point of view, it makes some sense to also put all information about what was given as input to compilation into TCCState, let's not only put files[0], but all files and all libraries given explicitely by user. One point: I've used bitfield for reloc_output & trimmed down output_type to 8 bits so that TCCState stays the same in size, and also access to output_type is (hopefully) is not slower. By the way -- as of today, sizeof(TCCState) on i686-pc-linux-gnu is 2884 bytes...
* libtcc: Detect (but ignore) -init and -fini for -WlDetlef Riekenberg2010-04-051-1/+1
| | | | | -- By by ... Detlef
* libtcc: Allow multiple options for -Wl separated with ','Detlef Riekenberg2010-04-051-0/+3
| | | | | | | I moved the code to libtcc to prepare for a later tiny_ld -- By by ... Detlef
* x86-64: use uplong for symbol valuesgrischka2010-01-141-1/+1
|
* tcc_relocate: revert to 0.9.24 behaviorgrischka2009-12-191-4/+3
|
* libtcc: add support to be build as DLLgrischka2009-04-181-20/+26
|
* libtcc: new api tcc_set_lib_pathgrischka2009-04-181-0/+3
|
* change tcc_add/get_symbol to use void*grischka2009-04-181-3/+3
|
* alternative int tcc_relocate(TCCState *s1, void *ptr);grischka2009-04-181-3/+4
|
* initial implementation of -E optionbellard2006-10-161-0/+1
|
* output format supportbellard2004-10-231-0/+4
|
* changed tcc_get_symbol() prototypebellard2003-07-201-2/+2
|
* added tcc_set_warning() - c++ include supportbellard2003-04-261-0/+11
|
* added better error supportbellard2002-11-021-9/+13
|
* added tcc_relocate() and tcc_get_symbol()bellard2002-09-081-1/+7
|
* added tcc_add_sysinclude_path()bellard2002-08-181-1/+4
|
* api changebellard2002-07-241-11/+20
|
* added libtccbellard2002-05-131-0/+60