There are a number of standard defines you can use to control the hxcpp
build. Some of these are used by the Haxe compiler, and affect the generated code. Others apply to the build tool and affect how the code is compiled.
Defines affecting how the code is generated. These need to be in the command line when calling haxe.
Define | Meaning |
---|---|
HXCPP_DEBUGGER | Add extra macros required by debugger. Usually added automatically by the debugger haxelib. |
HXCPP_GC_GENERATIONAL | Enable experimental generational garbage collector. |
annotate_source | Add additional annotations to the generated source code - useful for developing hxcpp . |
dll_export | Export hxcpp runtime symbols. |
file_extension | Set the extension (without the dot) of generated files. E.g. -D file_extension=mm for Objective-C++ code. |
force_native_property | Make dynamic access to fields call property getters/setters where appropriate. |
include_prefix | Place all generated include files in a sub-directory, e.g. -D include_prefix=hxinc . Useful for avoiding name clashes. |
no-compilation | Generate code, but do not compile it. |
no-debug | Do not generate debug macros in code |
nocppiaast | Use legacy cppia generation instead of new, more recent changes. |
objc | Generate Objective-C++ classes. |
scriptable | Enable extra runtime information required for scripting. |
Defines affecting how the code is compiled. These can be on the command line when calling haxe, or added via the hxcpp
build environment.
Define | Meaning |
---|---|
HXCPP_GC_MOVING | Allow garbage collector to move memory to reduce fragmentation. |
HXCPP_GC_SUMMARY | Print small profiling summary when the program exits. |
HXCPP_GC_DYNAMIC_SIZE | Monitor GC times and expand memory working space if required. |
HXCPP_GC_BIG_BLOCKS | Allow working memory greater than 1 gigabyte. |
HXCPP_GC_DEBUG_LEVEL | Specify a level (1-4 ) indicating additional debugging in GC. |
HXCPP_DEBUG_LINK | Add symbols to final binary, even in release mode. |
HXCPP_STACK_TRACE | Have valid function-level stack traces, even in release mode. |
HXCPP_STACK_LINE | Include line information in stack traces, even in release mode. |
HXCPP_CHECK_POINTER | Add null-pointer checks, even in release mode. |
HXCPP_PROFILER | Add profiler support. |
HXCPP_TELEMETRY | Add telemetry support. |
HXCPP_CPP11 | Use C++11 features and link libraries. |
exe_link | Generate executable file (rather than dynamic library on Android). |
static_link | Generate static library. |
dll_link | Generate dynamic library. |
Define | Meaning |
---|---|
HXCPP_VERBOSE | Print extra output from build tool. |
HXCPP_TIMES | Show some basic profiling information. |
HXCPP_NEKO_BUILDTOOL | Force use of hxcpp.n , rather than the compiled BuildTool.exe . |
HXCPP_NO_COLOR | Do not add color-codes to build tool output. |
HXCPP_KEEP_TEMP | Do not delete the files created for file embedName option. |
Define | Meaning |
---|---|
HXCPP_M32 | Force 32-bit compile for current desktop. |
HXCPP_M64 | Force 64-bit compile for current desktop. |
HXCPP_ARMV6 | Compile ARM-based devices for armv6 . |
HXCPP_ARM64 | Compile ARM-based devices for 64 bits. |
HXCPP_ARMV7 | Compile ARM-based devices for armv7 . |
HXCPP_ARMV7S | Compile ARM-based devices for armv7s . |
HXCPP_LINUX_ARMV7 | Compile for a Linux ARMv7 device. |
HXCPP_LINUX_ARM64 | Compile for a Linux ARM64 device. |
winrt | Compile for windowsRt/windows UWP. |
android | Compile for Android. |
PLATFORM | Specify the Android platform for NDK compilation. |
ANDROID_NDK_ROOT | Specify the location of the Android NDK toolchain. |
ANDROID_NDK_DIR | Specify the search location for finding the android NDK toolchain. |
HXCPP_X86 | Compile android for x86 architecture. |
iphoneos | Compile for iPhone iOS. |
iphonesim | Compile for iPhone simulator. |
appletvos | Compile for Apple tvOS. |
appletvsim | Compile for Apple tvOS simulator. |
watchos | Compile for Apple watchOS. |
watchsimulator | Compile for Apple watchOS simulator. |
webos | Compile for webOS. |
tizen | Compile for Tizen. |
blackberry | Compile for Blackberry- |
emscripten | Compile for Emscripten. |
cygwin | Compile for Windows using Cygwin. |
linux | (Cross) Compile for Linux. |
rpi | (Cross) Compile for Raspberry Pi. |
mingw | Compile for Windows using MinGW. |
HXCPP_MINGW | Compile for Windows using MinGW. |
NO_AUTO_MSVC | Do not detect MSVC location, use the one already in the executable path. |