-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
x64: only enable VTune dependencies on x86_64 targets #4533
Conversation
As described in bytecodealliance#4523, the `ittapi` dependency necessary for Wasmtime's VTune support does not compile on `aarch64-linux-android`. There are several incompatible parts here: though `ittapi` supports all OS combinations that Wasmtime does and builds on all CPU targets, VTune is not primarily intended for aarch64 profiling and `linux-android` is not a high priority platform for the library. We could conditionally depend on `ittapi` for Wasmtime's supported OS combinations, but I think a better answer is to limit it to x86_64 targets, since this more clearly shows why the `ittapi`/VTune support is present and also fixes bytecodealliance#4523.
5a928f2
to
3a39834
Compare
Could you double-check that this fixes at least the issue in #4523 (although I suspect more exist) |
Like compile with |
Looks like something else is the problem now: $ cargo build --release --target aarch64-linux-android
...
error: failed to run custom build command for `psm v0.1.18`
Caused by:
process didn't exit successfully: `/home/abrown/Code/wasmtime/target/release/build/psm-d3851756418374a6/build-script-build` (exit status: 1)
--- stdout
OPT_LEVEL = Some("3")
TARGET = Some("aarch64-linux-android")
HOST = Some("x86_64-unknown-linux-gnu")
CC_aarch64-linux-android = None
CC_aarch64_linux_android = None
TARGET_CC = None
CC = None
CFLAGS_aarch64-linux-android = None
CFLAGS_aarch64_linux_android = None
TARGET_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
cargo:rustc-cfg=asm
cargo:rustc-cfg=switchable_stack
running: "aarch64-linux-android-clang" "-O3" "-DANDROID" "-ffunction-sections" "-fdata-sections" "-fPIC" "-Wall" "-Wextra" "-xassembler-with-cpp" "-DCFG_TARGET_OS_android" "-DCFG_TARGET_ARCH_aarch64" "-DCFG_TARGET_ENV_" "-o" "/home/abrown/Code/wasmtime/target/aarch64-linux-android/release/build/psm-975239bbdf5842b2/out/src/arch/aarch_aapcs64.o" "-c" "src/arch/aarch_aapcs64.s"
--- stderr
error occurred: Failed to find tool. Is `aarch64-linux-android-clang` installed? |
Could you perhaps set |
$ AR=true CC=true cargo build --release --target aarch64-linux-android
...
error: could not find native static library `psm_s`, perhaps an -L flag is missing?
error: could not compile `psm` due to previous error And, yeah, I do not see |
@abrown unfortunately, error[E0433]: failed to resolve: use of undeclared crate or module error[E0433]: failed to resolve: use of undeclared crate or module error[E0433]: failed to resolve: use of undeclared crate or module For more information about this error, try |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for testing @gneworld. As mentioned aarch64-linux-android is not yet a supported platform. PRs are welcome to help shore up platform support but otherwise there's likely to be compile errors like that
Otherwise though it looks like compilation got past ittapi-rs so I'm going to approve this for merge since it fixes at least this issue.
As described in #4523, the
ittapi
dependency necessary for Wasmtime'sVTune support does not compile on
aarch64-linux-android
. There areseveral incompatible parts here: though
ittapi
supports all OScombinations that Wasmtime does and builds on all CPU targets, VTune is
not primarily intended for aarch64 profiling and
linux-android
is nota high priority platform for the library. We could conditionally depend
on
ittapi
for Wasmtime's supported OS combinations, but I think abetter answer is to limit it to x86_64 targets, since this more clearly
shows why the
ittapi
/VTune support is present and also fixes #4523.