[PATCH] D112952: [AIX] Avoid depending on objdump
Jinsong Ji via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 1 12:48:44 PDT 2021
jsji created this revision.
jsji added reviewers: PowerPC, daltenty, shchenz.
jsji requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
On AIX, we are currently relying on `objdump` to detemine the
is_32_bit_windows.
`objdump` is not installed by default on AIX, it is creating problem to
dependent on it, especially just for a always false detection on AIX.
So this patch simply provide a always false function to satify the
detection.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D112952
Files:
llvm/utils/extract_symbols.py
Index: llvm/utils/extract_symbols.py
===================================================================
--- llvm/utils/extract_symbols.py
+++ llvm/utils/extract_symbols.py
@@ -88,6 +88,7 @@
yield name
process.wait()
+
# Define functions which determine if the target is 32-bit Windows (as that's
# where calling convention name decoration happens).
@@ -126,6 +127,11 @@
return (match.group(1) == 'COFF-i386')
return False
+# If we are relying on nm, then we are not targeting windows,
+# always return false.
+def nm_is_32bit_windows(lib):
+ return False
+
# MSVC mangles names to ?<identifier_mangling>@<type_mangling>. By examining the
# identifier/type mangling we can decide which symbols could possibly be
# required and which we can discard.
@@ -353,7 +359,7 @@
# Determine the function to use to get the list of symbols from the inputs,
# and the function to use to determine if the target is 32-bit windows.
tools = { 'dumpbin' : (dumpbin_get_symbols, dumpbin_is_32bit_windows),
- 'nm' : (nm_get_symbols, None),
+ 'nm' : (nm_get_symbols, nm_is_32bit_windows),
'objdump' : (None, objdump_is_32bit_windows),
'llvm-readobj' : (readobj_get_symbols, readobj_is_32bit_windows) }
get_symbols = None
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112952.383861.patch
Type: text/x-patch
Size: 1331 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211101/24174370/attachment.bin>
More information about the llvm-commits
mailing list