Repository navigation
Conversation
Co-authored-by: Karim Akra <144803230+KarimAkra@users.noreply.github.com>
dimensionscape
left a comment
There was a problem hiding this comment.
Thanks for this. Two things need to change before it can go in, and I have one question.
-
LIBEXTRA when both HXCPP_M64 and HXCPP_ARM64 are defined. The build tool sets both when the architecture comes from
HXCPP_ARCH=arm64or from the host on an Apple Silicon Mac (set64intools/hxcpp/BuildTool.hx). The current lines give.iphonesim-arm64there. With the new section none of the three lines match, so LIBEXTRA falls through to the generic-64further downfinish-setup.xmland the library gets the wrong name. The current three lines already pick the right suffix in every case, so please leave them as they are. -
-targetis added unconditionally, but its value is only added for HXCPP_M64 or HXCPP_ARM64. A build with neither gets a bare-targetthat takes-isysrootas its value. Putting the same condition on the flag fixes it:<flag value="-target" if="HXCPP_M64 || HXCPP_ARM64"/>, in both the compiler and the linker. -
What does
-targetfix? libhxcpp already builds arm64 simulator libraries with-arch arm64and-mios-simulator-version-min, so I'd like to see the command and the error you get without it, and the Xcode version. If it's the dylib link, which has no version-min flag, say so in the PR and the commit message, and add a line to Changes.md. CI doesn't build for the simulator, so it can't tell us either way.
Please also drop the whitespace changes and the edit to the commented-out flag, so the diff is only the fix.
|
I'll look when I have time. |
dimensionscape
left a comment
There was a problem hiding this comment.
Thanks, the LIBEXTRA section is right now: set64 defines both HXCPP_M64 and HXCPP_ARM64 for arm64, and it picks .iphonesim-arm64 there, with the other two cases coming out as before.
The flags won't build, though. Without -target, the triples are bare arguments after -arch arm64, so clang takes arm64-apple-ios-simulator as an input file and fails, in both the compiler and the linker blocks. Either put the flag back in front of them, guarded so there is never a bare -target:
<flag value="-target" if="HXCPP_M64 || HXCPP_ARM64"/>
<flag value="x86_64-apple-ios-simulator" if="HXCPP_M64" unless="HXCPP_ARM64" />
<flag value="arm64-apple-ios-simulator" if="HXCPP_ARM64" />or drop the triples and keep -arch, if that with -mios-simulator-version-min already does what you need. Which one is right depends on the error you hit, so could you paste it, with your Xcode version? CI has no iOS simulator build, so it won't catch this either way.
The whitespace-only changes on the -arch lines and the edit to the commented-out version-min line can go too, so the diff is just the fix.
|
Yes, but I'm testing stuff with the change after I forked FunkinCrew's hxcpp. |
|
The reason why I added |
|
Oh actually, I might try drop it because it looks unnecessary. |
This is based of Karim's patch in FunkinCrew's hxcpp fork