Skip to main content


cdt-cpp - Antelope smart contract C++ to WebAssembly compiler


cdt-cpp [options] <input file>


cdt-cpp 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 building libc


As secure log file name (initialized from AS_SECURE_LOG_FILE env variable)


The maximum nesting depth allowed for assembly macros


Only run preprocess, compile, and assemble steps


Use colors in output (default=autodetect)


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


Enable C++17 aligned allocation functions


Assemble file for x86-64


Use colors in diagnostics


Enable support for the C++ Coroutines TS


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


File to append -stats and -timer output to


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


Maximum size for the name of non-global values


Write output to <file>


Export only this symbol


Maximum optimization to perform


Enable optimization remarks from passes whose name match the given regular expression


Enable optimization analysis remarks from passes whose name match the given regular expression


Enable missed optimization remarks from passes whose name match the given regular expression


Print all option values after command line parsing


Print non-default options after command line parsing


Enable the usage of a string table with YAML remarks


Seed for the random number generator


Make shared object native library


Stack canary for non stack first layouts


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


Use full module build paths in the profile counter names for static functions


Strip specified level of directory name from source path in the profile counter name for static functions


Enable statistics output from program (available with Asserts)


Display statistics as json data


Language standard to compile for


Assert that prof branch_weights metadata is valid when creating an instance of SwitchInstProfUpdateWrapper


Set the system root directory


Minimum time granularity (in microseconds) traced by time profiler


Enable -time-passes memory tracking (this may be slow)


Use llvm.dbg.addr for all local variables


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


Execute graph viewer in the background. Creates tmp file litter


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