diff options
| author | Mehdi Amini <mehdi.amini@apple.com> | 2016-11-07 17:40:28 +0000 |
|---|---|---|
| committer | Mehdi Amini <mehdi.amini@apple.com> | 2016-11-07 17:40:28 +0000 |
| commit | 7b9e9f2857149aa480a5ef5d4dac346cf99245fc (patch) | |
| tree | 29aa7d83a1c41d0c708f134faa91bb08ee722746 /llvm/docs | |
| parent | b31ee819c8311b87010eda79ab0c9bd3244201e2 (diff) | |
| download | bcm5719-llvm-7b9e9f2857149aa480a5ef5d4dac346cf99245fc.tar.gz bcm5719-llvm-7b9e9f2857149aa480a5ef5d4dac346cf99245fc.zip | |
Add some facilities to work with a git monorepo (experimental setup)
Summary:
Some changes are made to cmake, especially the addition of a new
LLVM_ENABLE_PROJECTS option that makes the build system aware of
the monorepo directory structure.
Also a new script is added in llvm/utils/git-svn/. When present in
the $PATH, it enables a `git llvm` command. It is providing at this
point only the ability to push from the git monorepo: `git llvm push`.
It is intended to evolves with more features, for instance I plan on
features like `git llvm show r284955` to help working with sequential
revision numbers.
The push feature is taken from Justin Lebar's script available here:
https://github.com/jlebar/llvm-repo-tools/
Reviewers: jlebar
Subscribers: mgorny, modocache, llvm-commits
Differential Revision: https://reviews.llvm.org/D26334
llvm-svn: 286123
Diffstat (limited to 'llvm/docs')
| -rw-r--r-- | llvm/docs/GettingStarted.rst | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/llvm/docs/GettingStarted.rst b/llvm/docs/GettingStarted.rst index 59fbc2e5f16..8fd2a3c13f2 100644 --- a/llvm/docs/GettingStarted.rst +++ b/llvm/docs/GettingStarted.rst @@ -680,6 +680,60 @@ about files with uncommitted changes. The fix is to rebuild the metadata: Please, refer to the Git-SVN manual (``man git-svn``) for more information. +For developers to work with a git monorepo +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. note:: + + This set-up is using unofficial mirror hosted on GitHub, use with caution. + +To set up a clone of all the llvm projects using a unified repository: + +.. code-block:: console + + % export TOP_LEVEL_DIR=`pwd` + % git clone https://github.com/llvm-project/llvm-project/ + % cd llvm-project + % git config branch.master.rebase true + +You can configure various build directory from this clone, starting with a build +of LLVM alone: + +.. code-block:: console + + % cd $TOP_LEVEL_DIR + % mkdir llvm-build && cd llvm-build + % cmake -GNinja ../llvm-project/llvm + +Or lldb: + +.. code-block:: console + + % cd $TOP_LEVEL_DIR + % mkdir lldb-build && cd lldb-build + % cmake -GNinja ../llvm-project/llvm -DLLVM_ENABLE_PROJECTS=lldb + +Or a combination of multiple projects: + +.. code-block:: console + + % cd $TOP_LEVEL_DIR + % mkdir clang-build && cd clang-build + % cmake -GNinja ../llvm-project/llvm -DLLVM_ENABLE_PROJECTS="clang;libcxx;compiler-rt" + +A helper script is provided in `llvm/utils/git-svn/git-llvm`. After you add it +to your path, you can push committed changes upstream with `git llvm push`. + +.. code-block:: console + + % export PATH=$PATH:$TOP_LEVEL_DIR/llvm-project/llvm/utils/git-svn/ + % git llvm push + +While this is using SVN under the hood, it does not require any interaction from +you with git-svn. +After a few minutes, `git pull` should get back the changes as they were +commited. + Local LLVM Configuration ------------------------ |

