Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion bolt/test/link_fdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import argparse
import os
import shutil
import subprocess
import sys
import re
Expand Down Expand Up @@ -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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need which to handle shell aliases?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alias is handled by realpath(). which() is to get the absolute path of nm, which is then passed to realpath() to get the actual target if it is a symlink.

nm_output = subprocess.run(
[
args.nmtool,
Expand Down
Loading