Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions llvm/docs/CodeReview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.