Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit efeea93

Browse files
committed
linuxarm thing
1 parent 7b6fc78 commit efeea93

1 file changed

Lines changed: 13 additions & 14 deletions

File tree

tools/hxcpp/BuildTool.hx

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ class BuildTool
6666
var mNvccLinkFlags:Array<String>;
6767
var mDirtyList:Array<String>;
6868
var arm64:Bool;
69+
var armv7:Bool;
6970
var m64:Bool;
7071
var m32:Bool;
7172

@@ -134,15 +135,17 @@ class BuildTool
134135
m64 = mDefines.exists("HXCPP_M64");
135136
m32 = mDefines.exists("HXCPP_M32");
136137
arm64 = mDefines.exists("HXCPP_ARM64");
137-
var otherArmArchitecture = mDefines.exists("HXCPP_ARMV6") || mDefines.exists("HXCPP_ARMV7") || mDefines.exists("HXCPP_ARMV7S");
138-
if (m64==m32 && !arm64 && !otherArmArchitecture)
138+
armv7 = mDefines.exists("HXCPP_ARMV7");
139+
var otherArmArchitecture = mDefines.exists("HXCPP_ARMV6") || mDefines.exists("HXCPP_ARMV7S");
140+
if (m64==m32 && !arm64 && !armv7 && !otherArmArchitecture)
139141
{
140142
var arch = mDefines.get("HXCPP_ARCH");
141143
if (arch!=null)
142144
{
143145
m64 = arch=="x86_64";
144146
m32 = arch=="x86";
145147
arm64 = arch=="arm64";
148+
armv7 = arch=="armv7";
146149
}
147150
else
148151
{
@@ -152,6 +155,7 @@ class BuildTool
152155
m64 = hostArch=="m64";
153156
m32 = hostArch=="m32";
154157
arm64 = hostArch=="arm64";
158+
armv7 = hostArch=="armv7";
155159
}
156160

157161
mDefines.remove(m32 ? "HXCPP_M64" : "HXCPP_M32");
@@ -576,7 +580,7 @@ class BuildTool
576580
first = false;
577581
Log.lock();
578582
Log.println("");
579-
Log.info("\x1b[33;1mCompiling group: " + group.mId + " (" + to_be_compiled.length + " file" + (to_be_compiled.length==1 ? "" : "s") + ")\x1b[0m");
583+
Log.info("\x1b[33;1mCompiling group: " + group.mId + "\x1b[0m");
580584
var message = "\x1b[1m" + (nvcc ? getNvcc() : mCompiler.mExe) + "\x1b[0m";
581585
var flags = group.mCompilerFlags;
582586
if (!nvcc)
@@ -612,15 +616,10 @@ class BuildTool
612616
} : null;
613617

614618
Profile.push("compile");
615-
616-
var compile_progress = null;
617-
if (!Log.verbose)
618-
compile_progress = new Progress(0,to_be_compiled.length);
619-
620619
if (threadPool==null)
621620
{
622621
for(file in to_be_compiled)
623-
mCompiler.compile(file,-1,groupHeader,pchStamp,compile_progress);
622+
mCompiler.compile(file,-1,groupHeader,pchStamp);
624623
}
625624
else
626625
{
@@ -636,7 +635,7 @@ class BuildTool
636635
break;
637636
var file = to_be_compiled[index];
638637

639-
compiler.compile(file,threadId,groupHeader,pchStamp,compile_progress);
638+
compiler.compile(file,threadId,groupHeader,pchStamp);
640639
}
641640
});
642641
}
@@ -2065,21 +2064,21 @@ class BuildTool
20652064
defines.set("toolchain","linux");
20662065
defines.set("linux","linux");
20672066

2068-
if (defines.exists("HXCPP_LINUX_ARMV7"))
2067+
if (armv7)
20692068
{
20702069
defines.set("noM32","1");
20712070
defines.set("noM64","1");
20722071
defines.set("HXCPP_ARMV7","1");
20732072
m64 = false;
20742073
}
2075-
else if (arm64 || defines.exists("HXCPP_LINUX_ARM64"))
2074+
else if (arm64)
20762075
{
20772076
defines.set("noM32","1");
20782077
defines.set("noM64","1");
20792078
defines.set("HXCPP_ARM64","1");
20802079
m64 = true;
20812080
}
2082-
defines.set("BINDIR", arm64 ? "LinuxArm64" : m64 ? "Linux64" : "Linux");
2081+
defines.set("BINDIR", arm64 ? "LinuxArm64" : armv7 ? "LinuxArm" : m64 ? "Linux64" : "Linux");
20832082
}
20842083
}
20852084
else if ( (new EReg("mac","i")).match(os) )
@@ -2411,7 +2410,7 @@ class BuildTool
24112410
if (isArm64)
24122411
{
24132412
outDefines.set("HXCPP_ARM64","1");
2414-
outDefines.remove("HXCPP_M64");
2413+
outDefines.set("HXCPP_M64","1");
24152414
outDefines.remove("HXCPP_32");
24162415
}
24172416
else if (in64)

0 commit comments

Comments
 (0)