Skip to content

Instantly share code, notes, and snippets.

@jdonaldson
Last active March 3, 2020 01:05
Show Gist options
  • Save jdonaldson/17c6918ae8337c5b53211f4470d8ab44 to your computer and use it in GitHub Desktop.
Save jdonaldson/17c6918ae8337c5b53211f4470d8ab44 to your computer and use it in GitHub Desktop.
-main Main
-cpp out
-D disable_unicode_strings
-cmd echo "cpp"
-cmd ./out/Main
class Main {
static function main() {
#if disable_unicode_strings
trace("disable unicode flag");
#end
#if target.unicode
trace("unicode enabled");
#end
defines();
}
macro static function defines(?e:haxe.macro.Expr): haxe.macro.Expr {
var defines = haxe.macro.Context.getDefines();
trace(defines + " is the value for defines");
return macro null;
}
}
Main.hx|21 info| {utf16 => 1,true => 1,target.utf16 => true,target.unicode => true,target.threaded => true,target.sys => true,target.static => true,target.name => cpp,sys => 1,static => 1,source-header => Generated by Haxe 4.1.0-rc.1,hxcpp_api_level => 400,haxe_ver => 4.100,haxe4 => 1,haxe3 => 1,haxe => 4.1.0-rc.1,disable_unicode_strings => 1,dce => std,cpp => 1} is the value for defines
|| haxelib run hxcpp Build.xml haxe -Ddisable_unicode_strings="1" -Dhaxe="4.1.0-rc.1" -Dhaxe3="1" -Dhaxe4="1" -Dhaxe_ver="4.100" -Dhxcpp_api_level="400" -Dsource-header="Generated by Haxe 4.1.0-rc.1" -Dstatic="1" -Dtarget.name="cpp" -Dtarget.static="true" -Dtarget.sys="true" -Dtarget.threaded="true" -Dtarget.unicode="true" -Dtarget.utf16="true" -Dutf16="1" -I"" -I"/Users/jdonaldson/Projects/haxe/std/cpp/_std/" -I"/Users/jdonaldson/Projects/haxe/std/"
|| cpp
||
Main.hx|4 info| disable unicode flag
Main.hx|11 info| target.unicode
||
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment