[llvm] f1d32a5 - [AIX] Avoid depending on objdump
Jinsong Ji via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 2 12:16:03 PDT 2021
Author: Jinsong Ji
Date: 2021-11-02T19:15:57Z
New Revision: f1d32a521e62dba3cee0090ac7b4f60ed4499507
URL: https://github.com/llvm/llvm-project/commit/f1d32a521e62dba3cee0090ac7b4f60ed4499507
DIFF: https://github.com/llvm/llvm-project/commit/f1d32a521e62dba3cee0090ac7b4f60ed4499507.diff
LOG: [AIX] Avoid depending on objdump
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
depend on it, especially just for an always false detection on AIX.
So this patch simply provide a always false function to satify the
detection.
Reviewed By: #powerpc, daltenty
Differential Revision: https://reviews.llvm.org/D112952
Added:
Modified:
llvm/utils/extract_symbols.py
Removed:
################################################################################
diff --git a/llvm/utils/extract_symbols.py b/llvm/utils/extract_symbols.py
index 6f01cd12fcd8..d9d89093f3d3 100755
--- a/llvm/utils/extract_symbols.py
+++ b/llvm/utils/extract_symbols.py
@@ -126,6 +126,11 @@ def readobj_is_32bit_windows(lib):
return (match.group(1) == 'COFF-i386')
return False
+# On AIX, there isn't an easy way to detect 32-bit windows objects with the system toolchain,
+# so just assume false.
+def aix_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.
@@ -357,7 +362,7 @@ def extract_symbols(arg):
'objdump' : (None, objdump_is_32bit_windows),
'llvm-readobj' : (readobj_get_symbols, readobj_is_32bit_windows) }
get_symbols = None
- is_32bit_windows = None
+ is_32bit_windows = aix_is_32bit_windows if sys.platform.startswith('aix') else None
# If we have a tools argument then use that for the list of tools to check
if args.tools:
tool_exes = args.tools
More information about the llvm-commits
mailing list