diff options
author | Chih-Hung Hsieh <chh@google.com> | 2020-02-04 23:34:48 -0800 |
---|---|---|
committer | George Burgess <gbiv@chromium.org> | 2020-02-05 18:35:05 +0000 |
commit | 042613e6302d394bd52eb520bbc01b84ea86897f (patch) | |
tree | 5891fcfa8621697c69da625afbc6427f93667ecf | |
parent | 4279700937de4511d5af5be568fdea36f8adf51a (diff) | |
download | toolchain-utils-042613e6302d394bd52eb520bbc01b84ea86897f.tar.gz |
Add --use_src_head.
This flag is used in non-bisecting mode by Android llvm builder,
to use the HEAD of src_path directory as is,
without calling git_llvm_rev or get_llvm_hash.
BUG=None
TEST=None
Change-Id: I99f75936d85b969009df3648d4759ff98e63bd4c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2037149
Reviewed-by: George Burgess <gbiv@chromium.org>
Tested-by: Chih-Hung Hsieh <chh@google.com>
Commit-Queue: Chih-Hung Hsieh <chh@google.com>
Auto-Submit: Chih-Hung Hsieh <chh@google.com>
-rwxr-xr-x | llvm_tools/patch_manager.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/llvm_tools/patch_manager.py b/llvm_tools/patch_manager.py index 82a73ed8..3c83fa96 100755 --- a/llvm_tools/patch_manager.py +++ b/llvm_tools/patch_manager.py @@ -95,6 +95,13 @@ def GetCommandLineArgs(): 'bisecting a patch (default: %(default)s) - only used for ' '"bisect_patches"') + # Trust src_path HEAD and svn_version. + parser.add_argument( + '--use_src_head', + action='store_true', + help='Use the HEAD of src_path directory as is, not necessarily the same ' + 'as the svn_version of upstream.') + # Add argument for the LLVM version to use for patch management. parser.add_argument( '--svn_version', @@ -718,8 +725,9 @@ def main(): # patches that fail to apply could successfully apply if HEAD's SVN version # was the same as 'svn_version'. In other words, HEAD's git hash should be # what is being updated to (e.g. LLVM_NEXT_HASH). - VerifyHEADIsTheSameAsSVNVersion(args_output.src_path, - args_output.svn_version) + if not args_output.use_src_head: + VerifyHEADIsTheSameAsSVNVersion(args_output.src_path, + args_output.svn_version) else: # `git bisect run` called this script. # |