summaryrefslogtreecommitdiffstats
path: root/llvm/docs
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2016-11-07 22:14:09 +0000
committerMehdi Amini <mehdi.amini@apple.com>2016-11-07 22:14:09 +0000
commit51d0f40d0ad1bcd4556922509137bc2785342ca0 (patch)
treed9fe3c75316d56b6c479b6eb80409d967dca4c93 /llvm/docs
parent1eed06a3795d01a843d9ec0bc81f436da8d03779 (diff)
downloadbcm5719-llvm-51d0f40d0ad1bcd4556922509137bc2785342ca0.tar.gz
bcm5719-llvm-51d0f40d0ad1bcd4556922509137bc2785342ca0.zip
[doc] Add documentation about how to use a monorepo
llvm-svn: 286163
Diffstat (limited to 'llvm/docs')
-rw-r--r--llvm/docs/GettingStarted.rst56
1 files changed, 56 insertions, 0 deletions
diff --git a/llvm/docs/GettingStarted.rst b/llvm/docs/GettingStarted.rst
index 59fbc2e5f16..e07c35ff85a 100644
--- a/llvm/docs/GettingStarted.rst
+++ b/llvm/docs/GettingStarted.rst
@@ -680,6 +680,62 @@ 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. Note that a current limitation is that `git` does not directly record
+file rename, and thus it is propagated to SVN as a combination of delete-add
+instead of a file rename.
+
Local LLVM Configuration
------------------------
OpenPOWER on IntegriCloud