aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Prichard <rprichard@google.com>2023-06-08 22:36:22 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-06-08 22:36:22 +0000
commit3a076e0b12e4c29b4691d4bf30b54791616f1141 (patch)
treea3537d1c8842286450124d0752381265cd9f49a7
parente2517e31f19183042bd55a1d11c7f2d3b87f51f6 (diff)
parentb59220f313a931fbd0d6f1568b668f4667ed733b (diff)
downloadcpython3-3a076e0b12e4c29b4691d4bf30b54791616f1141.tar.gz
Prefer the MSBuild in C:\VS over the one in Program Files. am: 5c60119f0d am: 7725ed4b1c am: b59220f313
Original change: https://android-review.googlesource.com/c/platform/external/python/cpython3/+/2619245 Change-Id: I0991ab9a7cb421e54b9c1c58f8e9f0b8323bc25b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--kokoro/kokoro_build.cmd6
1 files changed, 6 insertions, 0 deletions
diff --git a/kokoro/kokoro_build.cmd b/kokoro/kokoro_build.cmd
index 7b7bb7ba25..095f593f12 100644
--- a/kokoro/kokoro_build.cmd
+++ b/kokoro/kokoro_build.cmd
@@ -20,6 +20,12 @@ set PYTHON_SRC=%~dp0..
:: (It could leave Cygwin at the very end, but that's less of a problem.)
set PATH=%PATH:C:\cygwin64\bin;=%
+:: The Kokoro image has two copies of MSBuild installed. Prefer the one in
+:: C:\VS\MSBuild over the one in
+:: "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild"
+:: See https://yaqs.corp.google.com/eng/q/8657098259782696960#a1.
+if exist C:\VS\MSBuild\Current\Bin\amd64\MSBuild.exe (set "PATH=C:\VS\MSBuild\Current\Bin\amd64;%PATH%")
+
:: When we're actually running in the Kokoro environment, the git checkouts are
:: not owned by the current user, so when the Python build scripts query info
:: about them, git fails. Fix this by disabling git's safe directory checking.