-
Notifications
You must be signed in to change notification settings - Fork 186
/
0008-Use-the-correct-path-to-libclang_rt.builtins.a.patch
46 lines (42 loc) · 1.89 KB
/
0008-Use-the-correct-path-to-libclang_rt.builtins.a.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
From 334f64aafb062324a9124a13855128dfe733c0c2 Mon Sep 17 00:00:00 2001
From: Max Ihlenfeldt <[email protected]>
Date: Tue, 19 Dec 2023 12:14:05 +0000
Subject: [PATCH] Use the correct path to libclang_rt.builtins.a
Chromium needs to link against libclang_rt.builtins.a, but it expects
it in a slightly different directory than where it actually is in our
sysroot. Thus, we need adjust the where Chromium looks for the library.
Note that the directory used by this patch is actually independent of
the target architecture. This has the added benefit that we can just
copy the target's libclang_rt.builtins.a to the host's sysroot (to the
same directory where the host's library is). This is necessary because
Chromium needs to link against this library for both host and target
code, but only allows us to specify a single `clang_base_path`.
Upstream-Status: Inappropriate [specific to our sysroot setup]
Signed-off-by: Max Ihlenfeldt <[email protected]>
---
build/config/clang/BUILD.gn | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/build/config/clang/BUILD.gn b/build/config/clang/BUILD.gn
index 5f17171..d90a7e0 100644
--- a/build/config/clang/BUILD.gn
+++ b/build/config/clang/BUILD.gn
@@ -147,14 +147,15 @@ template("clang_lib") {
} else if (is_apple) {
_dir = "darwin"
} else if (is_linux || is_chromeos) {
+ _dir = "linux"
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"
+ _suffix = "-armhf"
} else if (current_cpu == "arm64") {
- _dir = "aarch64-unknown-linux-gnu"
+ _suffix = "-aarch64"
} else {
assert(false) # Unhandled cpu type
}