From 00132fa740d9556301bea656c3b66472adfd269d Mon Sep 17 00:00:00 2001 From: DavidKorczynski Date: Mon, 11 Apr 2022 18:04:38 +0100 Subject: [PATCH] fuzz-introspector: force use of llvm-nm instead of nm (#7533) This fixes various current build failures across projects that use nm as part of their build process. --- infra/base-images/base-builder/compile | 3 +++ infra/base-images/base-clang/checkout_build_install_llvm.sh | 1 + 2 files changed, 4 insertions(+) diff --git a/infra/base-images/base-builder/compile b/infra/base-images/base-builder/compile index ae62feeec..b11649fdb 100755 --- a/infra/base-images/base-builder/compile +++ b/infra/base-images/base-builder/compile @@ -149,13 +149,16 @@ fi if [ "$SANITIZER" = "introspector" ]; then export LDFLAGS="-fuse-ld=gold -flto" export AR=llvm-ar + export NM=llvm-nm export RANLIB=llvm-ranlib # Move ar and ranlib mv /usr/bin/ar /usr/bin/old-ar + mv /usr/bin/nm /usr/bin/old-nm mv /usr/bin/ranlib /usr/bin/old-ranlib ln -sf /usr/local/bin/llvm-ar /usr/bin/ar + ln -sf /usr/local/bin/llvm-nm /usr/bin/nm ln -sf /usr/local/bin/llvm-ranlib /usr/bin/ranlib fi diff --git a/infra/base-images/base-clang/checkout_build_install_llvm.sh b/infra/base-images/base-clang/checkout_build_install_llvm.sh index bda401857..ae0550f94 100755 --- a/infra/base-images/base-clang/checkout_build_install_llvm.sh +++ b/infra/base-images/base-clang/checkout_build_install_llvm.sh @@ -225,6 +225,7 @@ mv \ /usr/local/bin/llvm-config \ /usr/local/bin/llvm-cov \ /usr/local/bin/llvm-objcopy \ + /usr/local/bin/llvm-nm \ /usr/local/bin/llvm-profdata \ /usr/local/bin/llvm-ranlib \ /usr/local/bin/llvm-symbolizer \