Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For cross-compiling to Windows/macOS/Linux, respect -hl flag. #1610

Open
wants to merge 2 commits into
base: 8.2.0-Dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions tools/CommandLineTools.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1557,6 +1557,12 @@ class CommandLineTools
case "mac", "macos":
target = Platform.MAC;
overrides.haxedefs.set("macos", "");
case "windows":
target = Platform.WINDOWS;
overrides.haxedefs.set("windows", "");
case "linux":
target = Platform.LINUX;
overrides.haxedefs.set("linux", "");

case "rpi", "raspberrypi":
target = Platform.LINUX;
Expand Down
12 changes: 6 additions & 6 deletions tools/platforms/LinuxPlatform.hx
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,10 @@ class LinuxPlatform extends PlatformTarget
is64 = false;
}

if (project.targetFlags.exists("neko") || project.target != cast System.hostPlatform)
if (project.targetFlags.exists("neko"))
{
targetType = "neko";
}
else if (project.targetFlags.exists("hl"))
{
targetType = "hl";
is64 = true;
}
else if (project.targetFlags.exists("nodejs"))
{
targetType = "nodejs";
Expand All @@ -153,6 +148,11 @@ class LinuxPlatform extends PlatformTarget
{
targetType = "java";
}
else if (project.targetFlags.exists("hl") || project.target != (cast System.hostPlatform))
{
targetType = "hl";
is64 = true;
}
Apprentice-Alchemist marked this conversation as resolved.
Show resolved Hide resolved
else
{
targetType = "cpp";
Expand Down
12 changes: 6 additions & 6 deletions tools/platforms/MacPlatform.hx
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,10 @@ class MacPlatform extends PlatformTarget
}
}

if (project.targetFlags.exists("neko") || project.target != cast System.hostPlatform)
if (project.targetFlags.exists("neko"))
{
targetType = "neko";
}
else if (project.targetFlags.exists("hl"))
{
targetType = "hl";
is64 = true;
}
else if (project.targetFlags.exists("java"))
{
targetType = "java";
Expand All @@ -151,6 +146,11 @@ class MacPlatform extends PlatformTarget
{
targetType = "cs";
}
else if (project.targetFlags.exists("hl") || project.target != (cast System.hostPlatform))
{
targetType = "hl";
is64 = true;
}
else
{
targetType = "cpp";
Expand Down
12 changes: 6 additions & 6 deletions tools/platforms/WindowsPlatform.hx
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,10 @@ class WindowsPlatform extends PlatformTarget
{
targetType = "winjs";
}
else if (project.targetFlags.exists("neko") || project.target != cast System.hostPlatform)
else if (project.targetFlags.exists("neko"))
{
targetType = "neko";
}
else if (project.targetFlags.exists("hl"))
{
targetType = "hl";
is64 = !project.flags.exists("32");
}
else if (project.targetFlags.exists("cppia"))
{
targetType = "cppia";
Expand All @@ -168,6 +163,11 @@ class WindowsPlatform extends PlatformTarget
{
targetType = "winrt";
}
else if (project.targetFlags.exists("hl") || project.target != (cast System.hostPlatform))
{
targetType = "hl";
is64 = !project.flags.exists("32");
}
else
{
targetType = "cpp";
Expand Down