Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Fix breakage

Vishnu Mohandas01329d14ced3
diff --git a/rust/.cargo/config.toml b/rust/.cargo/config.toml
index bdfbe510cc..02bf10b127 100644
--- a/rust/.cargo/config.toml
+++ b/rust/.cargo/config.toml
@@ -1,6 +1,11 @@
[alias]
codegen = ["run", "-p", "codegen", "--"]
+[env]
+# Some targets, like armv7 Android, have no enabled target features, so Cargo
+# otherwise omits CARGO_CFG_TARGET_FEATURE. llama-cpp-sys-2 expects it to exist.
+CARGO_CFG_TARGET_FEATURE = ""
+
[target.'cfg(target_arch = "aarch64")']
rustflags = ["--cfg", "chacha20_force_neon"]
@@ -10,8 +15,7 @@ rustflags = ["--cfg", "chacha20_force_neon"]
rustflags = ["--cfg", "chacha20_force_neon", "-C", "link-arg=-Wl,-z,max-page-size=16384"]
[target.armv7-linux-androideabi]
-# llama-cpp-sys-2 expects Cargo to provide CARGO_CFG_TARGET_FEATURE; armv7 Android has none by default.
-rustflags = ["--cfg", "target_feature=\"\"", "-C", "link-arg=-Wl,-z,max-page-size=16384"]
+rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]
[target.x86_64-linux-android]
rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]