As noted in conditional compilation, custom defines can always be added on the command line with -D ...
. However, to provide better completion in the IDE, and to provide documentation for a Haxe user, defines can be registered with the compiler in initialization macros using the methods:
The compiler argument --help-user-defines
displays a list of registered defines.
haxe --lib somelibrary --lib another --help-user-defines