From 2ee90379fbfa4bda0274f691c2c832621c2333df Mon Sep 17 00:00:00 2001 From: Joel Winarske 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