[llvm] [BOLT][test] Resolve symlink for nm tool (NFC) (PR #136722)

Amir Ayupov via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 22 09:03:39 PDT 2025


================
@@ -85,7 +86,7 @@
             exit("ERROR: unexpected input:\n%s" % line)
 
 # Read nm output: <symbol value> <symbol type> <symbol name>
-is_llvm_nm = os.path.basename(args.nmtool) == "llvm-nm"
+is_llvm_nm = os.path.basename(os.path.realpath(shutil.which(args.nmtool))) == "llvm-nm"
----------------
aaupov wrote:

Do we need `which` to handle shell aliases?

https://github.com/llvm/llvm-project/pull/136722


More information about the llvm-commits mailing list