Hxcpp compiler flags / optimization levels

I tried to do

@:buildXml('
    <!-- compiler flags -->
    <compilerflag value="-O3" />
')

which actually includes it in Build.xml, but it’s ignored:

xcrun --sdk macosx10.11 clang++ -Iinclude -c -fvisibility=hidden -stdlib=
libstdc++ -O2 -I/usr/local/lib/haxelib/hxcpp/3,2,193/include 
-DHX_MACOS -m64 -Wno-parentheses -Wno-null-dereference -Wno-unused-value 
-Wno-format-extra-args -Wno-bool-conversion -DHXCPP_M64 
-DHXCPP_VISIT_ALLOCS -DHXCPP_API_LEVEL=321 -x c++ -frtti 
-Wno-invalid-offsetof ./src/ApplicationMain.cpp -o/Users/wildfireheart/IdeaProjects/
app/bin/
Client/mac64/cpp/obj/obj/darwin64/57588eaa_ApplicationMain.o

How can I set this?

You could modify the HXCPP XML for Mac directly. OpenFL supports Release, Debug and Final build configurations. I’ve wondered if we could set parameters in the HXCPP compiler toolchain files to allow for a “final” configuration (which is designed for best runtime performance, even if it is a slow build, while “release” is designed to balance runtime and build-time performance)

then openfl test mac -final would perhaps be the trigger to use O3 (and similar) code optimizations on C++. On HTML5, “-final” does dead-code elimination and minification