HXCPP: Haxe to C++ source, but no C++ compile or link.

199 views
Skip to first unread message

KlaxonCow

unread,
Mar 2, 2016, 1:20:29 AM3/2/16
to Haxe
I might have missed something obvious here, but how do you get Haxe to compile to C++ source code and then just stop, without going on to compile and link the C++ code?

I need it not to do that, because I want to use a different toolchain for another target - cross-compiling with gcc - and I'm also using makefiles to automate the build, so having separate compile and link stages makes that more efficient anyway.

I mean, in compiling and linking it with the native toolchain, it does create the C++ source code and leave it lying around, so I could just let it compile and link the C++ natively, ignore that and then just compile and link the C++ source code with the other toolchain I want to use. But that would be horribly slow and slightly pointless. It can take long enough to compile and link all the code once, let alone doing it twice and one of those times serving no actual useful purpose.

Is there a compiler switch for this? I can't see it in the documentation anywhere.

Andy Li

unread,
Mar 2, 2016, 1:32:01 AM3/2/16
to haxe...@googlegroups.com
Add `-D no-compilation`.
It is mentioned in `haxe --help-defines` and the page of Global Compiler Flags in the haxe manual.

Best,
Andy

--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/d/optout.

KlaxonCow

unread,
Mar 2, 2016, 2:04:28 AM3/2/16
to Haxe
Thanks.

I knew it had to be there somewhere, but just couldn't find it. I'll need to bookmark that compiler flags page for future reference.
Reply all
Reply to author
Forward
0 new messages