-
-
Notifications
You must be signed in to change notification settings - Fork 374
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
base: 8.2.0-Dev
Are you sure you want to change the base?
For cross-compiling to Windows/macOS/Linux, respect -hl flag. #1610
Conversation
This feels to me like a new feature rather than a bug fix. Could you target 8.1.0-Dev instead? (Probably requires cherry-picking and a force-push.) |
… has explicitely set another target.
509d07e
to
eee2220
Compare
This will cause issues with #1661. I think it might be good if the code for deciding whether to use hl or neko (or cpp) is moved here, where it sort of already is (though it later gets ignored): lime/src/lime/tools/ProjectXMLParser.hx Lines 127 to 142 in 9ebe6f3
|
As an HXP project user, I wouldn't want to put this in It would be nice to clean up some of this duplicate code, but I'm not sure there's a good place to put it. Also, it isn't an exact duplicate, which I'm sure is why it was split up into all the "Platform" classes in the first place. |
Ah, right I completely missed that... yes then it probably should all be cleaned up and moved into the platform files. I'm worried that some of these defines might be missing in hxp projects then? |
As for which one should be the default, it's hard to say. If I type Honestly, I think if there's no obvious default, maybe we shouldn't have one. Maybe the fall-through behavior should be an error message along the lines of "Please specify -hl or -mingw to cross-compile to Windows."
Can't rule it out. The HXP format doesn't get as much attention as I think it deserves. |
Actually, hang on.
Are you saying that if I typed If so, is there a difference between |
... I've just checked and current behavior is actually quite messed up.
On Windows there is no difference, on Mac/Linux |
Whoops! Yeah, we gotta change that.
Good. Then we definitely want to support As for |
Similar situation with MinGW currently. The haxelib release provides a Windows build of lime.ndll, but using a git version of lime you'd have to compile the lime.ndll yourself. Currently it doesn't compile with MinGW, though this might be solvable with some more work in #1660. On the other hand, if a haxelib release of lime is installed, it sounds like the user should already have everything for a hashlink cross-build? MinGW requires additional packages installed on the system. So from that perspective, it might be better to have a default that doesn't depend on external packages? At least, for regular users who install Lime from haxelib. From my perspective, I'm not too fussed about which is the default, adding |
I think choosing the best option for the end user's experience is most important. I'd vote for natively using minGW instead of HashLink. The dev can always change target with -hl if ever needed, but I think the default should be pointed toward runtime performance. |
I'm thinking The CommandLineTools.hx change is still good, since that happens even earlier on. |
This changes the behaviour of
lime build <windows|mac|linux>
by respecting the users preference for HL or Neko (current behavior is to force Neko).Also changes the default target for cross-compilation to HL.