File chromium-121-rust-clang_lib.patch of Package chromium

diff -up chromium-121.0.6167.57/build/config/clang/BUILD.gn.rust-clang_lib chromium-121.0.6167.57/build/config/clang/BUILD.gn
--- chromium-121.0.6167.57/build/config/clang/BUILD.gn.rust-clang_lib	2024-01-10 16:43:01.000000000 +0100
+++ chromium-121.0.6167.57/build/config/clang/BUILD.gn	2024-01-20 19:51:38.481992799 +0100
@@ -112,6 +112,7 @@ template("clang_lib") {
       _prefix = "lib"
       _suffix = ""
       _ext = "a"
+      _libprefix = ""
       if (is_win) {
         _dir = "windows"
         _prefix = ""
@@ -127,7 +128,19 @@ template("clang_lib") {
         }
       } else if (is_apple) {
         _dir = "darwin"
-      } else if (is_linux || is_chromeos) {
+      } else if (is_linux) {
+        _libprefix = "64"
+        _dir = "linux"
+        if (current_cpu == "x64") {
+          _suffix ="-x86_64"
+        } else if (current_cpu == "arm64") {
+          _suffix = "-aarch64"
+        } else if (current_cpu == "riscv64") {
+          _suffix = "-riscv64"
+        } else {
+          assert(false)  # Unhandled cpu type
+        }
+      } else if (is_chromeos) {
         if (current_cpu == "x64") {
           _dir = "x86_64-unknown-linux-gnu"
         } else if (current_cpu == "x86") {
@@ -166,7 +193,7 @@ template("clang_lib") {
         assert(false)  # Unhandled target platform
       }
 
-      _clang_lib_dir = "$clang_base_path/lib/clang/$clang_version/lib"
+      _clang_lib_dir = "$clang_base_path/lib${_libprefix}/clang/$clang_version/lib"
       _lib_file = "${_prefix}clang_rt.${_libname}${_suffix}.${_ext}"
       libs = [ "$_clang_lib_dir/$_dir/$_lib_file" ]
     }
openSUSE Build Service is sponsored by