Fix arm64 issues on mac (#3688)

Make wamrc normalize "arm64" to "aarch64v8". Previously the only way to
make the "arm64" target was to not specify a target on 64 bit arm-based
mac builds. Now arm64 and aarch64v8 are treated as the same.

Make aot_loader accept "aarch64v8" on arm-based apple (as well as
accepting legacy "arm64" based aot targets).

This also removes __APPLE__ and __MACH__ from the block that defaults
size_level to 1 since it doesn't seem to be supported for aarch64:
`LLVM ERROR: Only small, tiny and large code models are allowed on AArch64`
This commit is contained in:
Anders Bakken
2024-08-22 18:49:06 -07:00
committed by GitHub
parent b00904b092
commit e8c2952bf9
4 changed files with 17 additions and 11 deletions

View File

@ -601,8 +601,8 @@ main(int argc, char *argv[])
LOG_VERBOSE("Set size level to 1 for Windows AOT file");
option.size_level = 1;
}
#if defined(_WIN32) || defined(_WIN32_) || defined(__APPLE__) \
|| defined(__MACH__)
#if defined(_WIN32) || defined(_WIN32_) \
|| ((defined(__APPLE__) || defined(__MACH__)) && !defined(__arm64__))
if (!option.target_arch && !option.target_abi) {
LOG_VERBOSE("Set size level to 1 for Windows or MacOS AOT file");
option.size_level = 1;