From 4a4e9c9f2cf72bebf617585c5107d3936afca694 Mon Sep 17 00:00:00 2001 From: Brian Osman Date: Mon, 2 Mar 2020 14:10:34 -0500 Subject: [PATCH] Restore logic to check for .git in ANGLE BUILD.gn This should ensure that for users where the ANGLE git repo is present, we correctly re-generate commit.h when rolling to a new revision. Cq-Include-Trybots: skia/skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE Change-Id: Ib3c77a19d243896f4e7359dc4f14e87d4907739e Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274498 Reviewed-by: Geoff Lang Commit-Queue: Brian Osman --- third_party/angle2/BUILD.gn | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/third_party/angle2/BUILD.gn b/third_party/angle2/BUILD.gn index 90d85d5217..2dd1ffb945 100644 --- a/third_party/angle2/BUILD.gn +++ b/third_party/angle2/BUILD.gn @@ -74,6 +74,16 @@ action("commit_id") { commit_id_output_file, ] + # Add ANGLE git as a dependency if it is available. + angle_git_is_present = + exec_script("$angle_root/src/commit_id.py", [ "check" ], "value") == 1 + if (angle_git_is_present) { + # commit id should depend on angle's HEAD revision + inputs = [ + "$angle_root/.git/HEAD", + ] + } + args = [ "gen", rebase_path(commit_id_output_file, root_build_dir),