Question about HXProject.hx fields

Hi! I got a question about three fields in HXProject file.
These are targetflags, defines and haxedefs.
lets say I’m running:

lime build windows -aaa -Dbbb

I will end up with “aaa” in targetflag, and “bbb” in both defines and haxedefs.
“bbb” will also go into generated [debug/final/release].hxml file as “-D bbb”, and will be processed by hxcpp toolchains, like in:

<flag value="-O3" if="bbb"/>

Where goes “aaa” then? I mean it is just for internal lime tools usage? It seems that those arguments aren’t passed further. And could xml files process difference in “bbb”? E.g.

lime build windows -aaa -Dbbb=ccc
...
<flag value="-O3" if="bbb=ccc"/> <!-- flag is set when bbb=ccc -->

And why there are two fields for similar things (defines and haxedefs)? What is the difference there?

Haxedefs are the things that show up in [debug/final/release].hxml. You can then use them for conditional compilation: #if bbb trace("bbb"); #end.

Defines are used by if="bbb".

In project.xml, <set name="bbb" /> will add “bbb” to the defines but not the haxedefs. Likewise, <haxedef name="bbb" /> will add it to the haxedefs but not the defines.

Okay. Thank You! :slight_smile: