[extract_symbols.py] Fix llvm-readobj options.
As of D105532, a couple of llvm-readobj options have slightly changed their spellings. '-file-headers' has become '--file-header', and '-symbols' has become '--symbols'. A modern llvm-readobj will respond to those single-dash spellings by trying to parse them as combinations of single-letter options, so that you get "unknown argument '-f'" for -file-headers, and "unknown argument '-y'" for the second letter of -symbols. extract_symbols.py was still invoking llvm-readobj with those old single-dash spellings. Changed them to the newly canonical ones, which as far as I can tell still work on llvm-readobj from before the change. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D113556
This commit is contained in:
parent
c2ed9fd054
commit
7ac1fd0da9
|
@ -64,7 +64,7 @@ def nm_get_symbols(lib):
|
|||
process.wait()
|
||||
|
||||
def readobj_get_symbols(lib):
|
||||
process = subprocess.Popen(['llvm-readobj','-symbols',lib], bufsize=1,
|
||||
process = subprocess.Popen(['llvm-readobj','--symbols',lib], bufsize=1,
|
||||
stdout=subprocess.PIPE, stdin=subprocess.PIPE,
|
||||
universal_newlines=True)
|
||||
process.stdin.close()
|
||||
|
@ -118,7 +118,7 @@ def objdump_is_32bit_windows(lib):
|
|||
return False
|
||||
|
||||
def readobj_is_32bit_windows(lib):
|
||||
output = subprocess.check_output(['llvm-readobj','-file-headers',lib],
|
||||
output = subprocess.check_output(['llvm-readobj','--file-header',lib],
|
||||
universal_newlines=True)
|
||||
for line in output:
|
||||
match = re.match('Format: (\S+)', line)
|
||||
|
|
Loading…
Reference in New Issue