All these methods can be called for compiler configuration macros.
Static methods
staticgetDefine(key:Dynamic):Dynamic
A conditional compilation flag can be set on the command line using
-D key=value
.
Returns the value of a compiler flag.
If the compiler flag is defined but no value is set,
Compiler.getDefine
returns "1"
(e.g. -D key
).
If the compiler flag is not defined, Compiler.getDefine
returns
null
.
Note: This is a macro and cannot be called from within other macros. Refer
to haxe.macro.Context.definedValue
to obtain defined values in macro context.
See also:
staticincludeFile(file:Dynamic, position:Dynamic):Dynamic
Available on js, lua
Embed a JavaScript or Lua file at compile time (can be called by --macro
or within an __init__
method).