12.6.3.1 Structure of the top-level

The top-level nodes live inside an <xml> node, and can be:

  • set - Sets a "define", define being a general variable.
<setname="name"value="1"/>
  • setenv - Sets an hxcpp define and an environment variable for child processes.
<setenvname="name"value="1"/>
  • unset - Unsets a define. if="name" will no longer be true.
<unsetname="name"/>
  • setup - Used internally to call custom setup code to find SDKs etc.
<setupname="androidNdk|blackberry|msvc|pdbserver|mingw|emscripten|nvcc"/>
  • echo - Prints a value to console. Good for debugging.
<echovalue="text"/>
  • error - Prints a value to console and forces an error. Good for checking prerequisites.
<errorvalue="error message"/>
  • pleaseUpdateHxcppTool - Used to tell people updating git version that they need to recompile the build tool.
<pleaseUpdateHxcppToolversion="1"/>
  • path - Adds a directory to the exe search path.
<pathname="directory_to_add"/>
  • mkdir - Creates a directory.
<mkdirname="directory"/>
  • section - Groups blocks of elements - usually ones that all respect the same if/unless condition.
<sectionname="id"/>...</section>
  • copy - Copies a file when the node is parsed.
<copyto="destination"from="src"/>
  • import/include - Reads XML from another file. import resets the relative base to the new file, include does not.

    • noerror - when true, allows the file to be missing. (optional)
    • section - only read the named section from the XML file. Used by hxcpp_config.xml. (optional)
<importname="filename"section="filter"noerror="true"/><includename="filename"section="filter"noerror="true"/>
  • pragma - Only include build file once, even with multiple include statements.
<pragmaonce="true"/>
  • nvccflag - Adds flag to all nvcc compiles.
<nvccflagname="?name"value="-IincludePath"/>
  • nvcclinkflag - Adds flag when linking with nvcc code.
<nvcclinkflagname="?name"value="-arch=sm_30"/>
  • files - Defines a file group, and sets default tags.

    • dir - directory to which the filenames in the group are relative.
    • tags - comma-separated list of tags.
<filesdir="dir"name="name"tags="tag1,tag2,tag3">...</files>
  • target - Defines a target, and sets its toolid (link mode) and output name.
<targetname="name"overwrite="true"append="true"tool="linker"toolid="${haxelink}"output="filename">...</target>
  • copyFile - Copies a file after the given toolId is run into target output directory.
<copyFilename="destination"from="src"allowMissing="true"overwrite="true"toolId="filter"/>
  • magiclib - Internally used for replacing DLLs with object files.
<magiclibname="libname"replace="old dll"/>
  • compiler - Defines a compiler. It is assumed only 1 compiler is active.

    • replace - when true the compiler is overridden, otherwise the contents of this node are appended to an existing compiler with the same id. (optional)
    • exe - can be overridden in the body of the definition.
<compilerid="id"exe="command"replace="true">...</compiler>
  • stripper - Defines a stripper, used to remove debug information for release from gcc executables.

    • replace - when true overwrites, otherwise appends. (optional)
<stripperexe="command"replace="true">...</stripper>
  • linker - Defines a linker.

    • replace - when true overwrites, otherwise appends. (optional)
    • id - can be static_link, dll, or exe. Usually all 3 linkers are defined.
    • exe - can be overridden in the body of the definition.
<linkerid="id"exe="command"replace="true">...</linker>
  • prelinker - Defines a prelinker.

    • replace - when true overwrites, otherwise appends.
<prelinkername="id"replace="true"/>...</prelinker>

close