summaryrefslogtreecommitdiffstats
path: root/meta-agl-flutter/recipes-graphics/flutter-engine/files/0001-clang-toolchain.patch
blob: 8553a3a5f797a16e5179833ba0f29be6a3e50c45 (plain)
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
From 2ee90379fbfa4bda0274f691c2c832621c2333df Mon Sep 17 00:00:00 2001
From: Joel Winarske <joel.winarske@linux.com>
Date: Fri, 19 Feb 2021 22:15:24 +0000
Subject: [PATCH 1/2] clang toolchain

---
 build/toolchain/custom/BUILD.gn | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/build/toolchain/custom/BUILD.gn b/build/toolchain/custom/BUILD.gn
index 65b1623..8b3f6f8 100644
--- a/build/toolchain/custom/BUILD.gn
+++ b/build/toolchain/custom/BUILD.gn
@@ -12,11 +12,11 @@ toolchain("custom") {
   # these values in our scope.
   cc = "${toolchain_bin}/clang"
   cxx = "${toolchain_bin}/clang++"
-  ar = "${toolchain_bin}/${custom_target_triple}-ar"
+  ar = "${toolchain_bin}/llvm-ar"
   ld = "${toolchain_bin}/clang++"
-  readelf = "${toolchain_bin}/${custom_target_triple}-readelf"
-  nm = "${toolchain_bin}/${custom_target_triple}-nm"
-  strip = "${toolchain_bin}/${custom_target_triple}-strip"
+  readelf = "${toolchain_bin}/llvm-readelf"
+  nm = "${toolchain_bin}/llvm-nm"
+  strip = "${toolchain_bin}/llvm-strip"
 
   target_triple_flags = "--target=${custom_target_triple}"
   sysroot_flags = "--sysroot ${custom_sysroot}"
@@ -84,10 +84,9 @@ toolchain("custom") {
     link_command = "$ld $target_triple_flags $sysroot_flags -shared {{ldflags}} -o $unstripped_sofile $custom_lib_flags -Wl,--build-id=sha1 -Wl,-soname=$soname @$rspfile"
     toc_command = "{ $readelf -d $unstripped_sofile | grep SONAME ; $nm -gD -f posix $unstripped_sofile | cut -f1-2 -d' '; } > $temporary_tocname"
     replace_command = "if ! cmp -s $temporary_tocname $tocfile; then mv $temporary_tocname $tocfile; fi"
-    strip_command = "$strip -o $sofile $unstripped_sofile"
 
     command =
-        "$link_command && $toc_command && $replace_command && $strip_command"
+        "$link_command && $toc_command && $replace_command"
     rspfile_content = "-Wl,--whole-archive {{inputs}} {{solibs}} -Wl,--no-whole-archive {{libs}}"
 
     description = "SOLINK $sofile"
-- 
2.29.2