Projects
Eulaceura:Factory
chromium
_service:obs_scm:chromium-121-rust-clang_lib.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:chromium-121-rust-clang_lib.patch of Package chromium
From ce943790ea147d492f317097eb707745f78193a1 Mon Sep 17 00:00:00 2001 From: misaka00251 <liuxin@iscas.ac.cn> Date: Fri, 29 Mar 2024 15:12:35 +0800 Subject: [PATCH] Fix rust clang lib for openEuler --- build/config/clang/BUILD.gn | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/build/config/clang/BUILD.gn b/build/config/clang/BUILD.gn index d3054d1..8b956ed 100644 --- a/build/config/clang/BUILD.gn +++ b/build/config/clang/BUILD.gn @@ -105,6 +105,7 @@ template("clang_lib") { _prefix = "lib" _suffix = "" _ext = "a" + _libprefix = "" if (is_win) { _dir = "windows" _prefix = "" @@ -120,7 +121,33 @@ template("clang_lib") { } } else if (is_apple) { _dir = "darwin" - } else if (is_linux || is_chromeos) { + } else if (is_linux) { + _libprefix = "64" + if (current_cpu == "x64") { + if (clang_version == "17") { + _dir = "x86_64-openEuler-linux-gnu" + } else { + _dir = "linux" + _suffix ="-x86_64" + } + } else if (current_cpu == "arm64") { + if (clang_version == "17") { + _dir = "aarch64-openEuler-linux-gnu" + } else { + _dir = "linux" + _suffix = "-aarch64" + } + } else if (current_cpu == "riscv64") { + if (clang_version == "17") { + _dir = "riscv64-openEuler-linux-gnu" + } else { + _dir = "linux" + _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") { @@ -159,7 +186,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" ] } -- 2.39.3 (Apple Git-146)
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2