From a919a373da07305e763d1cb4ecb3a5a44bdebb2a Mon Sep 17 00:00:00 2001 From: Kirill Smelkov Date: Sun, 20 Jun 2010 19:49:58 +0400 Subject: Add input files/libs and reloc_output switch to TCCState 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.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libtcc.h') diff --git a/libtcc.h b/libtcc.h index 339dec1..13efcd2 100644 --- a/libtcc.h +++ b/libtcc.h @@ -103,6 +103,13 @@ LIBTCCAPI void *tcc_get_symbol(TCCState *s, const char *name); /* set CONFIG_TCCDIR at runtime */ LIBTCCAPI void tcc_set_lib_path(TCCState *s, const char *path); + +/*****************************/ +/* Miscellaneous */ + +/* Get default target filename for this compilation */ +LIBTCCAPI const char *tcc_default_target(TCCState *s); + #ifdef __cplusplus } #endif -- cgit v1.3.1