Skip to content

Commit f1d32a5

Browse files
author
Jinsong Ji
committed
[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
1 parent 2ed29d8 commit f1d32a5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

llvm/utils/extract_symbols.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,11 @@ def readobj_is_32bit_windows(lib):
126126
return (match.group(1) == 'COFF-i386')
127127
return False
128128

129+
# On AIX, there isn't an easy way to detect 32-bit windows objects with the system toolchain,
130+
# so just assume false.
131+
def aix_is_32bit_windows(lib):
132+
return False
133+
129134
# MSVC mangles names to ?<identifier_mangling>@<type_mangling>. By examining the
130135
# identifier/type mangling we can decide which symbols could possibly be
131136
# required and which we can discard.
@@ -357,7 +362,7 @@ def extract_symbols(arg):
357362
'objdump' : (None, objdump_is_32bit_windows),
358363
'llvm-readobj' : (readobj_get_symbols, readobj_is_32bit_windows) }
359364
get_symbols = None
360-
is_32bit_windows = None
365+
is_32bit_windows = aix_is_32bit_windows if sys.platform.startswith('aix') else None
361366
# If we have a tools argument then use that for the list of tools to check
362367
if args.tools:
363368
tool_exes = args.tools

0 commit comments

Comments
 (0)