ability to specify a type of the input file with the -x switch
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)
This commit is contained in:
6
libtcc.h
6
libtcc.h
@ -48,7 +48,11 @@ LIBTCCAPI void tcc_undefine_symbol(TCCState *s, const char *sym);
|
||||
/* compiling */
|
||||
|
||||
/* add a file (C file, dll, object, library, ld script). Return -1 if error. */
|
||||
LIBTCCAPI int tcc_add_file(TCCState *s, const char *filename);
|
||||
LIBTCCAPI int tcc_add_file(TCCState *s, const char *filename, int filetype);
|
||||
#define TCC_FILETYPE_BINARY 1
|
||||
#define TCC_FILETYPE_C 2
|
||||
#define TCC_FILETYPE_ASM 3
|
||||
#define TCC_FILETYPE_ASM_PP 4
|
||||
|
||||
/* compile a string containing a C source. Return -1 if error. */
|
||||
LIBTCCAPI int tcc_compile_string(TCCState *s, const char *buf);
|
||||
|
||||
Reference in New Issue
Block a user