Skip to main content


cdt-cc - Antelope smart contract C to WebAssembly compiler


cdt-cc [options] <input file>


cdt-cc Is a C compiler which converts C smart contract code to WebAssemply for execution in Antelope block chain virtual machines.



Include comments in preprocessed output


Include comments from within macros in preprocessed output

-D=<name definition>

Define <macro> to <value> (or 1 if <value> omitted)


Undefine any previous definition of name, either built in or defined with a -D option              


Only run the preprocessor    


Add directory to include search path


Add directory to library search path    


Write depfile output    


Write depfile containing user and system headers    


Like -MD except mention only user header files, not system header files. 


Specify name of main file output in depfile    


Optimization level s, 0-3     


Add the directory dir to the list of directories to be searched for resource files


Only run preprocess and compilation steps    


Enable the specified warning.   


Which ABI version to generate    


Generate ABI


ABIGEN output


Allow creation of name section


Should not be used, except for build libc


Only run preprocess, compile, and assemble steps


Contract name


Print macro definitions in -E mode in addition to normal output


Print include directives in -E mode in addition to normal output


Print macro definitions in -E mode instead to normal output


Disable symbolizing crash backtraces.


Emit Clang AST files for source inputs


Emit llvm ir


Use the LLVM representation for assembler and object files


Set the directory for eosio-pp


Generate position independent code. This option is used for shared libraries


Assemble file for x86-64


Use colors in diagnostics


Inline suitable functions


Inline functions which are (explicitly or implicitly) marked inline


Allow merging of constants


Compile and link for x86-64


Disable CFL Alias Analysis


Disable C++ copy constructor elision


Disable LTO


Don't run post processing pass


Don't set the stack first in memory


Produce binaries for wasmql


Produce binaries for wasmql


Produce binaries for wasmql


Enable stack protectors for functions potentially vulnerable to stack smashing


Force the usage of stack protectors for all functions


Use a strong heuristic to apply stack protectors to functions


Enable optimizations based on the strict definition of an enum's value range


Always treat control flow paths that fall off the end of a non-void function as unreachable


Enable optimizations based on the strict rules for overwriting polymorphic C++ objects


Use main as entry


Alias for --help


Display available options (--help-hidden for more)


Display all available options


Display list of available options (--help-list-hidden for more)


Display list of all available options


Set the file for cdt.imports


Include file before parsing


Set the system root directory (usually /)


Add directory to SYSTEM include search path


Root name of library to link


LTO Optimization level (O0-O3)


Pass arguments to llvm


Disable ABI file generation


Disable warnings for missing Ricardian clauses


Write output to <file>


Export only this symbol


Print all option values after command line parsing


Print non-default options after command line parsing


Make shared object native library


Stack canary for non stack first layouts


Specifies the maximum stack size for the contract. Defaults to 8192 bytes


Set the system root directory    


Set the malloc implementation to the old freeing malloc


Use software compiler-rt


Show commands to run and use verbose output


Display the version of this program


Suppress all warnings


Issue a warning if a read-only action uses a write API and continue compilation


Please submit bug reports online at


For more details consult the full documentation and sources