added support for arm64
and x64_arm64
in otp_build
#8863
+790
−21
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is one of the smaller PRs separated from the original PR #8142 that attempts to add initial support for ARM64 windows.
I'm open to change
x64_arm64
to any alternative value(s) that can tell us we're cross-compiling. I'm also open to addamd64_arm64
as an alias forx64_arm64
if we'd like to make it consistent with Microsoft Visual Studio, please see vcvarsall.In this PR,
echo_env_wsl
now accepts a single argumentARCH
, which can be one ofx64
,arm64
,x64_arm64
andx86
wsl_tools/vc/cc.sh
will setLINKCMD="-MACHINE:${MACHINE}"
by default, where the value forMACHINE
is:x64
whenCONFIG_SUBTYPE
iswin64
ARM64
whenCONFIG_SUBTYPE
is eitherarm64
orx64_arm64
x86
for all otherCONFIG_SUBTYPE
valueswsl_tools/vc/cc.sh
will add-D__aarch64__
toCOMMON_CFLAGS
when (cross-)compiling for the arm64 targetwsl_tools/reg_query.sh
will setREG_OPT=" /reg:64"
whenCONFIG_SUBTYPE
is eitherarm64
orx64_arm64
When compile on an arm64 machine natively
CONFIG_SUBTYPE
will be set toarm64
build_type
,host_type
andtarget_type
are all set tolocal-aarch64-pc-windows
win64-arm64.config.cache.static
will be used.It uses
win64.config.cache.static
as the template and alllocal-x86_64-pc-windows
are replaced bylocal-aarch64-pc-windows
When cross-compiling on an x86_64 host machine
CONFIG_SUBTYPE
will be set tox64_arm64
build_type
will be set tolocal-x86_64-pc-windows
whilehost_type
andtarget_type
are all set tolocal-aarch64-pc-windows
win64-x64_arm64.config.cache.static
will be used.It uses
win64.config.cache.static
as the template andlocal-x86_64-pc-windows
are replaced bylocal-aarch64-pc-windows
except forac_cv_build
andac_cv_env_build_alias_value