@@ -12,7 +12,7 @@ def run_command(command, cwd=None):
1212 sys .exit (1 )
1313
1414
15- def clone_repository (repo_name , path , repo_url , sub_paths , commit ):
15+ def clone_repository (repo_name , path , repo_url , sub_paths ):
1616 if os .path .exists (path ):
1717 while True :
1818 choice = input ("There is already a `{}` folder, do you want to update it? [y/N]" .format (path ))
@@ -21,18 +21,16 @@ def clone_repository(repo_name, path, repo_url, sub_paths, commit):
2121 return
2222 elif choice .lower () == "y" :
2323 print ("Updating repository..." )
24- run_command (["git" , "pull " , "origin" ], cwd = path )
24+ run_command (["git" , "fetch " , "origin" ], cwd = path )
2525 run_command (["git" , "checkout" , "origin/main" ,], cwd = path )
26- run_command (["git" , "checkout" , commit ], cwd = path )
2726 return
2827 else :
2928 print ("Didn't understand answer..." )
3029 print ("Cloning {} repository..." .format (repo_name ))
3130 run_command (["git" , "clone" , repo_url , "--filter=tree:0" , "--no-checkout" , path ])
3231 run_command (["git" , "sparse-checkout" , "init" ], cwd = path )
3332 run_command (["git" , "sparse-checkout" , "set" , * sub_paths ], cwd = path )
34- # run_command(["git", "checkout", "origin/main",], cwd=path)
35- run_command (["git" , "checkout" , commit ], cwd = path )
33+ run_command (["git" , "checkout" , "origin/main" ,], cwd = path )
3634
3735
3836def append_intrinsic (array , intrinsic_name , translation ):
@@ -112,11 +110,15 @@ def main():
112110 llvm_path ,
113111 "https://github.com/llvm/llvm-project" ,
114112 ["llvm/include/llvm/IR" , "llvm/include/llvm/CodeGen/" ],
115- # This is the git submodule commit of the LLVM repository used in the Rust repository.
116- "1268e87bdbaed0693a9d782ccd5a21e2cab2de33" ,
117113 )
118114 update_intrinsics (llvm_path )
119115
116+ # llvm-tblgen can be built with:
117+ #
118+ # mkdir llvm-tblgen-build && cd llvm-tblgen-build
119+ # cmake -G Ninja -DLLVM_ENABLE_PROJECTS="llvm" -DCMAKE_BUILD_TYPE=Release ../llvm
120+ # ninja llvm-tblgen
121+
120122
121123if __name__ == "__main__" :
122124 sys .exit (main ())
0 commit comments