Cross compilation for MacOS should be straightforward once the final
developer tools land. It wouldn't be possible to run the ARM build on an
Intel Mac for test runs, but I expect build issues are going to be more
common than arm-specific runtime issues. :)

Similarly Linux arm builds could be done with cross compilation, with the
same caveat that running is more difficult unless you play games with qemu.

-- brion

On Fri, Jul 10, 2020, 5:45 AM Floh <[email protected]> wrote:

> Was cross-compilation mentioned yet in the thread yet (I didn't find
> anything when quickly glancing over the posts).
>
> Since there was mention of universal binaries in the WWDC presentations,
> maybe it will actually be fairly simple to cross-compile binaries for ARM
> Macs on existing x86 build machines?
>
> (it is already trivial for binaries running on iOS devices versus on the
> iOS simulator, since the simulator is running x86 code, you just give it a
> different target triple, e.g. "-target arm64-apple-ios13.5" vs "-target
> x86_64-apple-ios13.5-simulator", so maybe cross-compiling for Macs will be
> equally simple...)
>
> Cheers,
> -Floh.
> On Friday, 10 July 2020 at 02:12:51 UTC+2 [email protected] wrote:
>
>> Yeah lets create an emsdk issue for this..
>>
>> On Thu, Jul 9, 2020 at 2:24 PM Brion Vibber <[email protected]> wrote:
>>
>>> Yeah, polling for new branches will do in a pinch. :)
>>>
>>> I'll see what I can get running on my local machine and then we'll see
>>> if we can get it working downloaded by emsdk...
>>>
>>> Shall I move detail discussion on this over to a GitHub issue or private
>>> email chain?
>>>
>>> And thanks! I'm very excited, this is gonna be helpful for me for now ;)
>>> and hopefully more people down the road!
>>>
>>> -- brion
>>>
>>> On Thu, Jul 9, 2020, 2:18 PM 'Sam Clegg' via emscripten-discuss <
>>> [email protected]> wrote:
>>>
>>>>
>>>>
>>>> On Thu, Jul 9, 2020 at 1:36 PM Brion Vibber <[email protected]> wrote:
>>>>
>>>>> What would be needed for emsdk distribution is automated builds made
>>>>> during the release process, requiring no manual intervention.
>>>>>
>>>>> If I personally must see the release announcement, run a build, and
>>>>> upload it before people can update and install, then we have failed 
>>>>> because
>>>>> there will be frequent delays in the best case.
>>>>>
>>>>> So if I can set up a VM that is pinged by your system when you're
>>>>> creating a new release and no manual tweaking, naming, testing, or command
>>>>> line invocations are necessary, but the build will go straight into where
>>>>> emsdk downloads from and no delays are present between Linux/x86_64
>>>>> availability and Linux/ARM64 availability, then I'm happy to rent a VM to
>>>>> make it happen. :)
>>>>>
>>>>
>>>> When releases happen we commit a change to
>>>> `emscripten-releases-tags.txt` the emsdk repo, so presumably it should be
>>>> possible today to simply write script to poll that repo every hour or so,
>>>> then build and upload the results?
>>>>
>>>> The downside is that the binaries that we release are actually not
>>>> built by the emsdk repro but at a python script in the waterfall repo:
>>>> https://github.com/WebAssembly/waterfall.   So even though emsdk can
>>>> build from source the binaries it expects are not build by that same code.
>>>>  This is a kind of a sad state of affairs, but it should still be possible
>>>> to setup a builder that uses those two repos to do your build and upload.
>>>>
>>>> We could start by doing one manually if you like?   You could upload an
>>>> linux/arm64 tar ball and we can modify emsdk such that it is installable?
>>>>
>>>>
>>>> cheers,
>>>> sam
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>
>>>>> -- brion
>>>>>
>>>>> On Thu, Jul 9, 2020, 12:52 PM 'Sam Clegg' via emscripten-discuss <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> I don't its is very likely that we will want to add these new
>>>>>> architectures to the ones that we pre-build and test on our 
>>>>>> infrastructure.
>>>>>>
>>>>>> The exception being macOS, but as you say that is a ways out still.
>>>>>>
>>>>>> I'm afraid I view linux/arm64 a lot like FreeBSD or some other unix
>>>>>> with relatively few users.  I'm a big fan of these niche platforms but
>>>>>> until there is a large enough userbase I don't think it worth our time to
>>>>>> try to support them officially.  Bear in mind that we don't even provide
>>>>>> pre-built binaries for linux/x86_32 (which I imagine has way more users
>>>>>> than linux/arm64).
>>>>>>
>>>>>> Having said that its seems reasonable that we could allow emsdk to
>>>>>> support these platforms if community members such as yourself want to 
>>>>>> take
>>>>>> the time to build and upload binary packages for them.    For example you
>>>>>> could put your binaries in gcs/s3 bucket and emsdk could look there when
>>>>>> running on linux/asm64.   Do you think that could work?
>>>>>>
>>>>>> cheers,
>>>>>> sam
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, Jul 9, 2020 at 11:43 AM 'Thomas Lively' via
>>>>>> emscripten-discuss <[email protected]> wrote:
>>>>>>
>>>>>>> Oh wow it didn't even cross my mind that we would be affected by
>>>>>>> Apple switching to ARM. I assume ARM MacOS is something we will want to
>>>>>>> support natively at some point, but I don't know whether or not the best
>>>>>>> solution is to just wait for our CI providers to add support. You're 
>>>>>>> also
>>>>>>> right that ideally we would support ARM64 on all three OSes, but that 
>>>>>>> would
>>>>>>> double our testing burden even if all our CI providers supported that. 
>>>>>>> I'm
>>>>>>> not sure what the best path forward is.
>>>>>>>
>>>>>>> On Thu, Jul 9, 2020 at 11:30 AM Brion Vibber <[email protected]>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> I've been a bit of an ARM64 enthusiast of late, trying out Linux,
>>>>>>>> Windows 10, and iOS devices that run on the ARM64/Aarch64 family of
>>>>>>>> processors. Emscripten works fine on these machines if one cares to do 
>>>>>>>> some
>>>>>>>> light development work on them, but since there's no binaries built 
>>>>>>>> from
>>>>>>>> CI, the standard emsdk can only install by building from source -- 
>>>>>>>> which
>>>>>>>> can take hours on a middleweight portable machine.
>>>>>>>>
>>>>>>>> Now that Apple is switching their Mac product line to ARM64
>>>>>>>> processors over the next two years, it will likely become much more 
>>>>>>>> common
>>>>>>>> next year for people to have ARM64-based laptop and desktop computers, 
>>>>>>>> and
>>>>>>>> some of them will need to build something with emscripten in their
>>>>>>>> workflows either on macOS or on a virtualized Linux in Docker etc.
>>>>>>>>
>>>>>>>> From what I've seen presented at WWDC, the ARM64 Macs will support
>>>>>>>> emulated processes, so it may work to ship the x86_64 binaries with the
>>>>>>>> caveat that they will run much slower than native builds.
>>>>>>>>
>>>>>>>> Virtualized Linux builds would also need native ARM64 binaries to
>>>>>>>> run, or else they'd have to sit there for a couple hours compiling 
>>>>>>>> after
>>>>>>>> every upgrade.
>>>>>>>>
>>>>>>>> And of course there are already Windows 10 and Linux computers
>>>>>>>> available with ARM64 processes, on sale since a couple years ago and 
>>>>>>>> used
>>>>>>>> in the wild in modest numbers.
>>>>>>>>
>>>>>>>> I get the impression that the biggest roadblock to explicit ARM64
>>>>>>>> support in emscripten is getting it into the CI infrastructure:
>>>>>>>> * Linux/ARM64 builds and testing?
>>>>>>>> * macOS/ARM64 builds and testing?
>>>>>>>> * Windows/ARM64 builds and testing?
>>>>>>>>
>>>>>>>> It's too soon to start on macOS since it's in beta, dev kits aren't
>>>>>>>> shipped yet, and there's no obvious way yet to figure out how to run 
>>>>>>>> tests
>>>>>>>> on a macOS ARM system in CI. :)
>>>>>>>>
>>>>>>>> And I'm less sure how important Win/ARM64 is, given you can use the
>>>>>>>> Linux/ARM64 version in WSL virtualization. But some folks prefer to 
>>>>>>>> develop
>>>>>>>> on native Windows, too.
>>>>>>>>
>>>>>>>> If there's any way we can start talking about Linux/ARM64 builds
>>>>>>>> and testing, I would be very happy about it! I would even kick in a few
>>>>>>>> bucks for a VM or something if that would help any. ;)
>>>>>>>>
>>>>>>>> Thanks for your time and your consideration!
>>>>>>>>
>>>>>>>> -- brion vibber (brion @ pobox.com / brion @ wikimedia.org)
>>>>>>>> Wikimedia Foundation
>>>>>>>>
>>>>>>>> --
>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>> Groups "emscripten-discuss" group.
>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>>> send an email to [email protected].
>>>>>>>> To view this discussion on the web visit
>>>>>>>> https://groups.google.com/d/msgid/emscripten-discuss/CAFnWYT%3D3OLskq1KBtVrgKsq1PTS7eHDxyzpcBpmE8_Bfk7m6Kw%40mail.gmail.com
>>>>>>>> <https://groups.google.com/d/msgid/emscripten-discuss/CAFnWYT%3D3OLskq1KBtVrgKsq1PTS7eHDxyzpcBpmE8_Bfk7m6Kw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>>>>> .
>>>>>>>>
>>>>>>> --
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>> Groups "emscripten-discuss" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>> send an email to [email protected].
>>>>>>> To view this discussion on the web visit
>>>>>>> https://groups.google.com/d/msgid/emscripten-discuss/CAJZD_EVv%3DLHPDF4nZeOUX7ryEEAWvAPWRMPKwxX%3DbUh3JTFdnQ%40mail.gmail.com
>>>>>>> <https://groups.google.com/d/msgid/emscripten-discuss/CAJZD_EVv%3DLHPDF4nZeOUX7ryEEAWvAPWRMPKwxX%3DbUh3JTFdnQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>>>> .
>>>>>>>
>>>>>> --
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "emscripten-discuss" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>> send an email to [email protected].
>>>>>> To view this discussion on the web visit
>>>>>> https://groups.google.com/d/msgid/emscripten-discuss/CAL_va28OryMnv1oKm%3DaE1Y3DK_X0nZayknT8VrUX-0kMM3BGhA%40mail.gmail.com
>>>>>> <https://groups.google.com/d/msgid/emscripten-discuss/CAL_va28OryMnv1oKm%3DaE1Y3DK_X0nZayknT8VrUX-0kMM3BGhA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "emscripten-discuss" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to [email protected].
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/emscripten-discuss/CAFnWYTnUY1NWzAV_TO0HwiF-uft8fxdKEwB2tbrYYyB_Q5ocRw%40mail.gmail.com
>>>>> <https://groups.google.com/d/msgid/emscripten-discuss/CAFnWYTnUY1NWzAV_TO0HwiF-uft8fxdKEwB2tbrYYyB_Q5ocRw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "emscripten-discuss" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2-TsGSBBhn%2B6nFyFsNG7xpZUOsJJSrz32-o1paQT%2B%2Bo7g%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2-TsGSBBhn%2B6nFyFsNG7xpZUOsJJSrz32-o1paQT%2B%2Bo7g%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "emscripten-discuss" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>>
>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/emscripten-discuss/CAFnWYTnX%2BcQGi45h-qbLJZ%2Bhc2b1ZFSivvpzPzjBP1msvx6b_A%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/emscripten-discuss/CAFnWYTnX%2BcQGi45h-qbLJZ%2Bhc2b1ZFSivvpzPzjBP1msvx6b_A%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/emscripten-discuss/7cdb69c6-7357-4e3a-ad3f-4035ab73f1b5n%40googlegroups.com
> <https://groups.google.com/d/msgid/emscripten-discuss/7cdb69c6-7357-4e3a-ad3f-4035ab73f1b5n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAFnWYT%3DvAWUeuditfrj-j6%2Bf%3DUYX8k8gT%3DhsZ27z5SR3xg0pFQ%40mail.gmail.com.

Reply via email to