I was so happy when I finally got an M1 MBP for work because as you say Docker is so much faster on it. I feel like I don't wait for anything anymore. Can't even imagine these new chips.
I’m going to be very happy when it’s time to replace my Intel MBP at work.
It’s rarely loud, but boy it likes to be warm/toasty at the stupidest things.
- use native toolchain to produce artifacts for a different architecture
- use emulation to run different arch toolchain to produce different arch artifacts
First one is fast, second one is slow. In docker only second variant is possible.
Why would you need to emulate x86 to produce x86-shaped bytes?
For exmaple, that is generally the way you cross compile Flatpaks in cli or ide. In, for example, GNOME Builder you can just select the device you want to build for, like your smartphone, and it uses QEMU to emulate the entire SDK in the target architecture, you can also seemlessly run the Flatpak on your host through QEMU user mode emulation too.
So when you compiled to WASM you're going with route #1. WASM was designed with this this in mind.
Then there are some gcc quirks:
- for gcc compilation target is defined when gcc is compiled, so only way to cross-compile with gcc that I know of is emulation of target arch and runing gcc for target arch
However, we're talking about docker containers here, emulation would be the default way and path of least resistance.
Again, I will reiterate: every cross-compilation strategy falls into one of these two buckets. In some cases what I've describe in #1 is possible (WASM, java bytecode or really (almost) anything that targets a VM), in some cases it isn't and then you gotta go with #2 (docker, gcc)
- clang and LLVM don't have that GCC quirk (LLVM support less platforms, so give gcc some credit)
- it was in apple's financial interest make sure their things are easy to cross-compile.
- linker job is extremely straighforward in case of iOS
- everything is provided by either apple or application developerBut this M1 Max MBP is just insane. I'm nearly 50 and it's the best machine I've ever owned; nothing is even close.
He told me his fans were going crazy and his entire desk was hot after that. Apple silicon is just a game changer.