[llvm][docs] Add notes on upstreaming code from downstream projects (#129743)

For context, see:
* https://discourse.llvm.org/t/code-review-process-when-upstreaming-patches
This commit is contained in:
Andrzej Warzyński
2025-03-12 11:17:19 +00:00
committed by GitHub
parent 014bf63c2e
commit 77b55c76ac

View File

@@ -272,3 +272,21 @@ Developers should participate in code reviews as both reviewers and
authors. If someone is kind enough to review your code, you should return the
favor for someone else. Note that anyone is welcome to review and give feedback
on a patch, but approval of patches should be consistent with the policy above.
Upstreaming Changes to LLVM
===========================
When upstreaming your own changes from a downstream project to LLVM, simply
follow the process outlined above.
When upstreaming changes originally written by someone else:
* Ensure that there are no obstacles to upstreaming the code. In some cases,
this simply means checking with the original author(s) to ensure they are
aware of and approve the upstreaming. In other cases, licensing
considerations may be more complex.
* Properly attribute the original changes, e.g., by creating a commit with
multiple authors (`GitHub guide <https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors>`_).
* Invite the original author(s) to review the changes, and also include
additional reviewers. Specifically, an LGTM from a (co-)author should not be
taken as approval to land a change.