Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wamr-compiler: Fix non-x86{_64} host builds #3037

Merged

Conversation

midokura-xavi92
Copy link
Contributor

@midokura-xavi92 midokura-xavi92 commented Jan 16, 2024

So far, the build system assumed sizeof (void *) == 8 as a host system running on a x86_64 architecture, x86 otherwise. However, this assumption is invalid for most other architectures out there, such as aarch64 or armv7l.

Instead, this commit refers to the CMAKE_HOST_SYSTEM_PROCESSOR variable which, according to the documentation, typically refers to the output from uname -m for Unix-like systems.

wamr-compiler/CMakeLists.txt Outdated Show resolved Hide resolved
wamr-compiler/CMakeLists.txt Outdated Show resolved Hide resolved
wamr-compiler/CMakeLists.txt Show resolved Hide resolved
So far, the build system assumed sizeof (void *) == 8 as a host system
running on a x86_64 architecture, x86 otherwise. However, this
assumption is invalid for most other architectures out there, such as
aarch64 or armv7l.

Instead, this commit refers to the CMAKE_HOST_SYSTEM_PROCESSOR variable
which, according to the documentation, typically refers to the output
from "uname -m" for Unix-like systems.
WAMR_BUILD_TARGET values such as RISCV64 or RISCV32 were not listed by
the comment, but were in fact consumed by the CMakeLists.txt at a later
stage.
@midokura-xavi92
Copy link
Contributor Author

build_iwasm ($FAST_INTERP_BUILD_OPTIONS, -DWAMR_BUILD_MULTI_MODULE=1, macos-latest, darwin) failed due to an apparently unrelated reason:

Warning: Failed to download action 'https://api.github.com/repos/actions/cache/tarball/e12d46a63a90f2fae62d114769bbf2a179198b5c'. Error: nodename nor servname provided, or not known (api.github.com:443)
Warning: Back off 27.614 seconds before retry.
Warning: Failed to download action 'https://api.github.com/repos/actions/cache/tarball/e12d46a63a90f2fae62d114769bbf2a179198b5c'. Error: nodename nor servname provided, or not known (api.github.com:443)
Warning: Back off 18.041 seconds before retry.
Error: nodename nor servname provided, or not known (api.github.com:443)

Copy link
Contributor

@wenyongh wenyongh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wenyongh wenyongh merged commit ade97ac into bytecodealliance:main Jan 17, 2024
407 checks passed
@midokura-xavi92 midokura-xavi92 deleted the wamrc-fix-nonx86-builds branch January 17, 2024 08:00
victoryang00 pushed a commit to victoryang00/wamr-aot-gc-checkpoint-restore that referenced this pull request May 27, 2024
The build system assumed sizeof (void *) == 8 as a host system
running on a x86_64 architecture, x86 otherwise. However, this
assumption is invalid for most other architectures out there, such as
aarch64 or armv7l.

This PR refers to the CMAKE_HOST_SYSTEM_PROCESSOR variable
which, according to the documentation, typically refers to the output
from "uname -m" for Unix-like systems.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants