jyknight / llvm-git-migration

7 stars 6 forks source link

zip-downstream-fork.py should handle arbirtary submodule trees #9

Closed greened closed 5 years ago

greened commented 5 years ago

zip-downstream-fork.py assumes an umbrella respository with submodules in places corresponding to the monorepo, i.e.::

umbrella compiler-rt llvm

It should handle other mappings, particularly the default nested layout expected by cmake::

umbrella llvm tools clang projects compiler-rt

The easiest way to do this would be to have the user provide a mapping file from submodule path to monorepo path, for example::

llvm -> llvm llvm/tools/clang -> clang llvm/projects/compiler-rt -> compiler-rt

This would allow flexibility to handle third-party submodules as well, potentially mapping them to specific places in the monorepo. The default mapping would be simply::

clang -> clang compiler-rt -> compiler-rt llvm -> llvm