[gn] Add explicit deps on TargetParser
This diff was generated by the following script: #!/usr/bin/env python3 import os, subprocess r = subprocess.run('git show --pretty='' --name-only f09cf34d'.split(), stdout=subprocess.PIPE, text=True) for line in r.stdout.splitlines(): if not line.endswith('CMakeLists.txt'): continue gn = 'llvm/utils/gn/secondary/' + os.path.dirname(line) + '/BUILD.gn' if not os.path.exists(gn): continue with open(gn) as f: contents = f.read() if contents.count('"//llvm/lib/Support",') == 1: contents = contents.replace( '"//llvm/lib/Support",', '"//llvm/lib/Support", "//llvm/lib/TargetParser",') elif contents.count(' deps = [') == 1: contents = contents.replace( ' deps = [', ' deps = [ "//llvm/lib/TargetParser",') else: print('needs manual fixup:', gn) continue with open(gn, 'w') as f: f.write(contents) I then manually fixed up the BUILD.gn files for Support (should not depend on TargetParser) and TargetParser (should depend on Support) and ran `gn format` on all touched files.
Loading
Please sign in to comment