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 errorAnd, 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 |
alexcrichton
left a comment
There was a problem hiding this comment.
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
ittapidependency necessary for Wasmtime'sVTune support does not compile on
aarch64-linux-android. There areseveral incompatible parts here: though
ittapisupports all OScombinations that Wasmtime does and builds on all CPU targets, VTune is
not primarily intended for aarch64 profiling and
linux-androidis nota high priority platform for the library. We could conditionally depend
on
ittapifor 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.