Index: docs/Contributing.rst =================================================================== --- /dev/null +++ docs/Contributing.rst @@ -0,0 +1,82 @@ +================================== +Contributing to LLVM +================================== + + +Thank you for your interest in contributing to LLVM! There are multiple ways to +contribute, and we appreciate all of them. In case you +have questions, you can either use the `Developer's List (llvm-dev)`_ +or the #llvm channel on `irc.oftc.net`_. + +If you want to contribute code, please familiarize yourself with the :doc:`DeveloperPolicy`. + +.. contents:: + :local: + + +Bug reports +----------- +If you are working with LLVM and run into a bug, we definitely want to know +about it. Please let us know and follow the instructions in +:doc:`HowToSubmitABug` to create a bug report. + + +Bug fixes +--------- +If you are interested in contributing code to LLVM, bugs labeled with the +`beginner keyword`_ in the `bug tracker`_ are a good way to get familiar with +the code base. If you are interested in fixing a bug, please create an account +for the bug tracker and assign it to you, to let people know you are working on +it. + +Then try to reproduce and fix the bug with upstream LLVM. Start by building +LLVM from source as described in :doc:`GettingStarted` and +and use the built binaries to reproduce the failure described in the bug. Use +a debug build (`-DCMAKE_BUILD_TYPE=Debug`) or a build with assertions +(`-DLLVM_ENABLE_ASSERTIONS=On`, enabled for Debug builds). + +Once you reproduced and fixed the bug, it is time to submit a patch. The patch +should + +* include a small unit test +* conform to the :doc:`CodingStandards`. You can use the `clang-format-diff.py`_ or `git-clang-format`_ tools to automatically format your patch properly. +* not contain any unrelated changes +* be an isolated change. Independent changes should be submitted as separate patches as this makes reviewing easier. + +To get a patch accepted, it has to be reviewed by the LLVM community. This can +be done using `LLVM's Phabricator`_ or the llvm-commits mailing list. +Please follow :ref:`Phabricator#requesting-a-review-via-the-web-interface ` +to request a review using Phabricator. + +To make sure the right people see your patch, please select suitable reviewers +and add them to your patch when requesting a review. Suitable reviewers are the +code owner (see CODE_OWNERS.txt) and other people doing work in the area your +patch touches. + +A reviewer usually accepts the patch with a `Looks good to me` or `LGTM`. Once +that is done the change can be committed. In case you do not yet have commit +access, please let people know during the review and someone should commit it +on your behalf. + +Sometimes it can take a while until someone has time to review the patch. +In that case you can ping the patch. The common courtesy ping rate is one week. +Remember that you are asking for valuable time from other professional developers. + + +Bigger pieces of work +--------------------- +In case you are interested in taking on a bigger piece of work, a list of +interesting projects is maintained at then +`LLVM's Open Projects page `_. +In case you are interested in working on any of these projects, +please send a mail to the +`LLVM Developer's `_ mailing list, +so that we know the project is being worked on. + +.. _Developer's List (llvm-dev): http://lists.llvm.org/mailman/listinfo/llvm-dev +.. _irc.oftc.net: irc://irc.oftc.net/llvm +.. _beginner keyword: https://bugs.llvm.org/buglist.cgi?bug_status=NEW&bug_status=REOPENED&keywords=beginner%2C%20&keywords_type=allwords&list_id=130748&query_format=advanced&resolution=--- +.. _bug tracker: https://bugs.llvm.org +.. _clang-format-diff.py: https://reviews.llvm.org/source/clang/browse/cfe/trunk/tools/clang-format/clang-format-diff.py +.. _git-clang-format: https://reviews.llvm.org/source/clang/browse/cfe/trunk/tools/clang-format/git-clang-format +.. _LLVM's Phabricator: https://reviews.llvm.org/ Index: docs/Phabricator.rst =================================================================== --- docs/Phabricator.rst +++ docs/Phabricator.rst @@ -38,6 +38,8 @@ You can learn more about how to use arc to interact with Phabricator in the `Arcanist User Guide`_. +.. _phabricator-request-review-web: + Requesting a review via the web interface ----------------------------------------- Index: docs/index.rst =================================================================== --- docs/index.rst +++ docs/index.rst @@ -66,6 +66,7 @@ CMake CMakePrimer + Contributing AdvancedBuilds HowToBuildOnARM HowToCrossCompileBuiltinsOnArm @@ -103,6 +104,9 @@ An addendum to the main Getting Started guide for those using the `CMake build system `_. +:doc:`Contributing` + An overview on how to contribute to LLVM. + :doc:`HowToBuildOnARM` Notes on building and testing LLVM/Clang on ARM.