From 3ff98fcca2c7287c776b0bcd69c845325444643a Mon Sep 17 00:00:00 2001
From: Georgy Moshkin <gmoshkin@picodata.io>
Date: Tue, 18 Jul 2023 17:36:50 +0300
Subject: [PATCH] build: used to look for incorrect library file on aarch64

---
 build.rs | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/build.rs b/build.rs
index 631f9974bd..2116b9bf64 100644
--- a/build.rs
+++ b/build.rs
@@ -285,7 +285,11 @@ fn build_tarantool(build_root: &Path) {
         // duplicate symbols which is not allowed (by default) when linking with
         // via -l... option
         let lib_dir = format!("{tarantool_build}/third_party/libunwind/src/.libs");
-        rustc::link_arg(format!("{lib_dir}/libunwind-x86_64.a"));
+        if cfg!(target_arch = "x86_64") {
+            rustc::link_arg(format!("{lib_dir}/libunwind-x86_64.a"));
+        } else if cfg!(target_arch = "aarch64") {
+            rustc::link_arg(format!("{lib_dir}/libunwind-aarch64.a"));
+        }
         rustc::link_arg(format!("{lib_dir}/libunwind.a"));
     }
 
-- 
GitLab