From b03fbdef16a115c65a8794223e0c5f09a9462c26 Mon Sep 17 00:00:00 2001 From: Ross Savage Date: Tue, 14 May 2024 09:25:25 +0200 Subject: [PATCH] Update android build clang to 17 --- libs/sdk-bindings/build.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/sdk-bindings/build.rs b/libs/sdk-bindings/build.rs index f33f22504..8b8387f89 100644 --- a/libs/sdk-bindings/build.rs +++ b/libs/sdk-bindings/build.rs @@ -2,7 +2,7 @@ use anyhow::*; use std::env; use std::path::Path; -const DEFAULT_CLANG_VERSION: &str = "14.0.7"; +const DEFAULT_CLANG_VERSION: &str = "17"; /// Adds a temporary workaround for an issue with the Rust compiler and Android /// in x86_64 devices: https://github.com/rust-lang/rust/issues/109717. @@ -23,14 +23,14 @@ fn setup_x86_64_android_workaround() { let clang_version = env::var("NDK_CLANG_VERSION").unwrap_or_else(|_| DEFAULT_CLANG_VERSION.to_owned()); let linux_x86_64_lib_dir = format!( - "toolchains/llvm/prebuilt/{build_os}-x86_64/lib64/clang/{clang_version}/lib/linux/" + "toolchains/llvm/prebuilt/{build_os}-x86_64/lib/clang/{clang_version}/lib/linux/" ); let linkpath = format!("{android_ndk_home}/{linux_x86_64_lib_dir}"); if Path::new(&linkpath).exists() { println!("cargo:rustc-link-search={android_ndk_home}/{linux_x86_64_lib_dir}"); println!("cargo:rustc-link-lib=static=clang_rt.builtins-x86_64-android"); } else { - panic!("Path {linkpath} not exists"); + panic!("Path {linkpath} not exists. Try setting the NDK_CLANG_VERSION environment variable."); } } }