llvm_opt_wrapper.py 396 B

123456789101112131415161718
  1. import subprocess
  2. import sys
  3. def fix(s):
  4. # we use '#' instead of ',' because ymake always splits args by comma
  5. if 'internalize' in s:
  6. return s.replace('#', ',')
  7. return s
  8. if __name__ == '__main__':
  9. path = sys.argv[1]
  10. args = [fix(s) for s in [path] + sys.argv[2:]]
  11. rc = subprocess.call(args, shell=False, stderr=sys.stderr, stdout=sys.stdout)
  12. sys.exit(rc)