21 lines
524 B
Python
Executable File
21 lines
524 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import sys
|
|
import subprocess
|
|
import os
|
|
import os.path
|
|
|
|
if __name__ == "__main__":
|
|
exe_path = os.path.abspath(__file__)
|
|
exe_path = os.path.dirname(exe_path) # get path of this file
|
|
ar_path = os.path.join(exe_path, "ar")
|
|
gold_plugin = os.path.join(exe_path, "LLVMgold.so")
|
|
|
|
if len(sys.argv) == 1:
|
|
out_argv = [ar_path]
|
|
else:
|
|
out_argv = [ar_path, sys.argv[1], '--plugin', gold_plugin]
|
|
out_argv.extend(sys.argv[2:])
|
|
|
|
sys.exit(subprocess.call(out_argv))
|