Update build tools.

The clang script needed to be tweaked slightly because they've since
changed the URL. Also libc++ now needs to be built as C++20. (The
bundled libc++ is only built in some of our test configs, so this
doesn't imply a C++20 dependency across the board.)

Change-Id: I0a9e3aed71268bcd37059af8549a23cfc0270b05
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/55272
Reviewed-by: Bob Beck <bbe@google.com>
Commit-Queue: Bob Beck <bbe@google.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ce55363..e643ece 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -558,9 +558,6 @@
     libcxxabi PRIVATE
     -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS
   )
-  set_target_properties(libcxxabi PROPERTIES COMPILE_FLAGS "-Wno-missing-prototypes -Wno-implicit-fallthrough")
-  # libc++abi depends on libc++ internal headers.
-  set_property(TARGET libcxxabi APPEND PROPERTY INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}/util/bot/libcxx/src")
   install(TARGETS libcxxabi EXPORT OpenSSLTargets)
 
   add_library(libcxx ${LIBCXX_SOURCES})
@@ -576,6 +573,15 @@
     -D_LIBCPP_BUILDING_LIBRARY
     -DLIBCXX_BUILDING_LIBCXXABI
   )
+  set_target_properties(
+    libcxx libcxxabi PROPERTIES
+    COMPILE_FLAGS "-Wno-missing-prototypes -Wno-implicit-fallthrough"
+    # libc++ and libc++abi must be built in C++20 mode.
+    CXX_STANDARD 20
+    CXX_STANDARD_REQUIRED TRUE
+  )
+  # libc++abi depends on libc++ internal headers.
+  set_property(TARGET libcxx libcxxabi APPEND PROPERTY INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}/util/bot/libcxx/src")
   target_link_libraries(libcxx libcxxabi)
   install(TARGETS libcxx EXPORT OpenSSLTargets DESTINATION ${CMAKE_INSTALL_LIBDIR})
 endif()
diff --git a/util/bot/DEPS b/util/bot/DEPS
index 1efc55a..f8549d7 100644
--- a/util/bot/DEPS
+++ b/util/bot/DEPS
@@ -25,17 +25,17 @@
   #  cipd describe PACKAGE_NAME -version latest
 
   # infra/3pp/tools/cmake/linux-amd64
-  'cmake_version': 'version:2@3.23.1',
+  'cmake_version': 'version:2@3.25.0.chromium.5',
   # infra/3pp/tools/go/linux-amd64
-  'go_version': 'version:2@1.18.2',
+  'go_version': 'version:2@1.19.3',
 
   # Update the following from
   # https://chromium.googlesource.com/chromium/src/+/main/DEPS
-  'android_sdk_platform-tools_version': 'g7n_-r6yJd_SGRklujGB1wEt8iyr77FZTUJVS9w6O34C',
+  'android_sdk_platform-tools_version': 'RSI3iwryh7URLGRgJHsCvUxj092woTPnKt4pwFcJ6L8C',
   'android_ndk_revision': '8388a2be5421311dc75c5f937aae13d821a27f3d',
   'libfuzzer_revision': 'debe7d2d1982e540fbd6bd78604bf001753f9e74',
-  'libcxx_revision': '79a2e924d96e2fc1e4b937c42efd08898fa472d7',
-  'libcxxabi_revision': '9b8228b4a9be26e0881f36089d9a8d62df851acc',
+  'libcxx_revision': 'cd0a05047451dfbdef5ba85f97ac4888e432a377',
+  'libcxxabi_revision': '1a32724f721e1c3b6c590a07fe4a954344f15e48',
 }
 
 deps = {
diff --git a/util/bot/UPDATING b/util/bot/UPDATING
index 1543ed6..de3370e 100644
--- a/util/bot/UPDATING
+++ b/util/bot/UPDATING
@@ -26,14 +26,11 @@
 
 nasm-win32.exe: Update to the appropriate release of NASM, found at
     https://www.nasm.us/. Use the same version as Chromium, found at
-    https://chromium.googlesource.com/chromium/src/+/main/third_party/nasm/README.chromium
+    https://chromium.googlesource.com/chromium/deps/nasm/+/refs/heads/main/README.chromium
     Extract nasm.exe from the download named nasm-VERSION-win64.zip.
 
     The current revision is nasm-2.13.03-win64.zip.
 
-    TODO(davidben): The Chromium link currently does not work. It will get
-    filled in in the future. See https://crbug.com/766721.
-
 perl-win32.zip: Update to the latest 64-bit prebuilt "Portable" edition of
     Strawberry Perl, found at http://strawberryperl.com/releases.html. The
     download will be named strawberry-perl-VERSION-64bit-portable.zip.
diff --git a/util/bot/update_clang.py b/util/bot/update_clang.py
index 59b0cad..0970514 100644
--- a/util/bot/update_clang.py
+++ b/util/bot/update_clang.py
@@ -28,8 +28,8 @@
 # CLANG_REVISION and CLANG_SUB_REVISION determine the build of clang
 # to use. These should be synced with tools/clang/scripts/update.py in
 # Chromium.
-CLANG_REVISION = 'llvmorg-15-init-10168-gc2a7904a'
-CLANG_SUB_REVISION = 2
+CLANG_REVISION = 'llvmorg-16-init-10736-ged9638c4'
+CLANG_SUB_REVISION = 1
 
 PACKAGE_VERSION = '%s-%s' % (CLANG_REVISION, CLANG_SUB_REVISION)
 
@@ -94,7 +94,7 @@
     DownloadUrl(url, f)
     f.seek(0)
     EnsureDirExists(output_dir)
-    tarfile.open(mode='r:gz', fileobj=f).extractall(path=output_dir)
+    tarfile.open(mode='r:*', fileobj=f).extractall(path=output_dir)
 
 
 def ReadStampFile(path=STAMP_FILE):
@@ -133,7 +133,7 @@
 
 
 def UpdateClang():
-  cds_file = "clang-%s.tgz" %  PACKAGE_VERSION
+  cds_file = "clang-%s.tar.xz" %  PACKAGE_VERSION
   if sys.platform == 'win32' or sys.platform == 'cygwin':
     cds_full_url = CDS_URL + '/Win/' + cds_file
   elif sys.platform.startswith('linux'):