PKGBUILDs/extra/chromium/compiler-rt-adjust-paths.patch

33 lines
1.2 KiB
Diff
Raw Normal View History

2024-02-01 00:28:56 +00:00
diff --git a/build/config/clang/BUILD.gn b/build/config/clang/BUILD.gn
index d4de2e0cca0..57359c32121 100644
--- a/build/config/clang/BUILD.gn
+++ b/build/config/clang/BUILD.gn
@@ -130,12 +130,15 @@ template("clang_lib") {
} else if (is_linux || is_chromeos) {
if (current_cpu == "x64") {
_dir = "x86_64-unknown-linux-gnu"
+ _suffix = "-x86_64"
} else if (current_cpu == "x86") {
_dir = "i386-unknown-linux-gnu"
+ _suffix = "-i386"
} else if (current_cpu == "arm") {
_dir = "armv7-unknown-linux-gnueabihf"
} else if (current_cpu == "arm64") {
_dir = "aarch64-unknown-linux-gnu"
+ _suffix = "-aarch64"
} else {
assert(false) # Unhandled cpu type
}
2024-03-13 12:57:32 +00:00
@@ -166,6 +169,11 @@ template("clang_lib") {
2024-02-01 00:28:56 +00:00
assert(false) # Unhandled target platform
}
2024-03-13 12:57:32 +00:00
+ # Bit of a hack to make this find builtins from compiler-rt >= 16
2024-02-01 00:28:56 +00:00
+ if (is_linux || is_chromeos) {
2024-03-13 12:57:32 +00:00
+ _dir = "linux"
2024-02-01 00:28:56 +00:00
+ }
+
_clang_lib_dir = "$clang_base_path/lib/clang/$clang_version/lib"
_lib_file = "${_prefix}clang_rt.${_libname}${_suffix}.${_ext}"
libs = [ "$_clang_lib_dir/$_dir/$_lib_file" ]