diff --git a/llvm/utils/extract_symbols.py b/llvm/utils/extract_symbols.py --- a/llvm/utils/extract_symbols.py +++ b/llvm/utils/extract_symbols.py @@ -126,6 +126,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 aix_nm_is_32bit_windows(lib): + return False + # MSVC mangles names to ?@. By examining the # identifier/type mangling we can decide which symbols could possibly be # required and which we can discard. @@ -353,7 +358,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, aix_nm_is_32bit_windows if sys.platform.startswith('aix') else None) 'objdump' : (None, objdump_is_32bit_windows), 'llvm-readobj' : (readobj_get_symbols, readobj_is_32bit_windows) } get_symbols = None