chore: added Apple M1 platform detection when compiling with Rosetta 2
This PR handles the special case when a developer is trying to compile on an Apple Silicon M1 machine with a toolchain that is dual-arch (arm64e
and x86_64
) which is a valid case when the build toolchain is x86_64
based and Rosetta 2 is active. In this case, the current configure.py
is unable to figure out the correct host platform as the toolchain will just return x86_64
even if the true host arch is arm64
.
The impl. in the commit is trying to keep the current logic as untouched as possible to prevent any regressions.