Skip to content

Commit

Permalink
Allow building for x86_64-linux-android (#7055)
Browse files Browse the repository at this point in the history
  • Loading branch information
truboxl authored Sep 18, 2023
1 parent 2ad057d commit ca702da
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/jit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ features = [
"Win32_System_Diagnostics_Debug",
]

[target.'cfg(target_arch = "x86_64")'.dependencies]
[target.'cfg(all(target_arch = "x86_64", not(target_os = "android")))'.dependencies]
ittapi = { version = "0.3.3", optional = true }

[features]
Expand Down
2 changes: 1 addition & 1 deletion crates/jit/src/profiling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ cfg_if::cfg_if! {
cfg_if::cfg_if! {
// Note: VTune support is disabled on windows mingw because the ittapi crate doesn't compile
// there; see also https://github.com/bytecodealliance/wasmtime/pull/4003 for rationale.
if #[cfg(all(feature = "vtune", target_arch = "x86_64", not(all(target_os = "windows", target_env = "gnu"))))] {
if #[cfg(all(feature = "vtune", target_arch = "x86_64", not(any(target_os = "android", all(target_os = "windows", target_env = "gnu")))))] {
mod vtune;
pub use vtune::new as new_vtune;
} else {
Expand Down
2 changes: 1 addition & 1 deletion crates/runtime/src/traphandlers/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ struct ucontext_t {

unsafe fn get_pc_and_fp(cx: *mut libc::c_void, _signum: libc::c_int) -> (*const u8, usize) {
cfg_if::cfg_if! {
if #[cfg(all(target_os = "linux", target_arch = "x86_64"))] {
if #[cfg(all(any(target_os = "linux", target_os = "android"), target_arch = "x86_64"))] {
let cx = &*(cx as *const libc::ucontext_t);
(
cx.uc_mcontext.gregs[libc::REG_RIP as usize] as *const u8,
Expand Down

0 comments on commit ca702da

Please sign in to comment.