From 8137432e67c920b73a3bbcc4eb72ae5095d31f41 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Thu, 28 Jul 2022 07:22:27 -0700 Subject: [PATCH] x64: only enable VTune dependencies on x86_64 targets (#4533) As described in #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 #4523. --- crates/jit/Cargo.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/jit/Cargo.toml b/crates/jit/Cargo.toml index da683d794c..74ae56c0ae 100644 --- a/crates/jit/Cargo.toml +++ b/crates/jit/Cargo.toml @@ -22,7 +22,6 @@ gimli = { version = "0.26.0", default-features = false, features = ["std", "read object = { version = "0.29.0", default-features = false, features = ["std", "read_core", "elf"] } serde = { version = "1.0.94", features = ["derive"] } addr2line = { version = "0.17.0", default-features = false } -ittapi = { version = "0.3.0", optional = true } bincode = "1.2.1" rustc-demangle = "0.1.16" cpp_demangle = "0.3.2" @@ -37,6 +36,9 @@ features = [ [target.'cfg(target_os = "linux")'.dependencies] rustix = { version = "0.35.6", features = ["process"] } +[target.'cfg(target_arch = "x86_64")'.dependencies] +ittapi = { version = "0.3.0", optional = true } + [features] jitdump = ['wasmtime-jit-debug'] vtune = ['ittapi']