diff llvm/utils/extract_symbols.py @ 173:0572611fdcc8 llvm10 llvm12

reorgnization done
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 11:55:54 +0900
parents 1d019706d866
children c4bab56944e8
line wrap: on
line diff
--- a/llvm/utils/extract_symbols.py	Mon May 25 11:50:15 2020 +0900
+++ b/llvm/utils/extract_symbols.py	Mon May 25 11:55:54 2020 +0900
@@ -42,9 +42,14 @@
     process.wait()
 
 def nm_get_symbols(lib):
-    process = subprocess.Popen(['nm','-P',lib], bufsize=1,
-                               stdout=subprocess.PIPE, stdin=subprocess.PIPE,
-                               universal_newlines=True)
+    if sys.platform.startswith('aix'):
+        process = subprocess.Popen(['nm','-P','-Xany','-C','-p',lib], bufsize=1,
+                                   stdout=subprocess.PIPE, stdin=subprocess.PIPE,
+                                   universal_newlines=True)
+    else:
+        process = subprocess.Popen(['nm','-P',lib], bufsize=1,
+                                   stdout=subprocess.PIPE, stdin=subprocess.PIPE,
+                                   universal_newlines=True)
     process.stdin.close()
     for line in process.stdout:
         # Look for external symbols that are defined in some section