Index: etc/repositories
===================================================================
--- etc/repositories	(revision 87973)
+++ etc/repositories	(working copy)
@@ -9,7 +9,12 @@
 ## BioC version associated with the current R version.
 ## Also, %bm is substituted from the setting of getOption("BioC_mirror")
 ##
+## UCRT3 experimental builds use a repository with experimental
+## builds of binary packages needing compilation, for testing new
+## versions of Rtools.
 menu_name	URL	default	source	win.binary	mac.binary
+CRAN_UCRT3	CRAN_UCRT3	https://www.r-project.org/nosvn/winutf8/ucrt3/CRAN_aarch64	TRUE	FALSE	TRUE	FALSE
+BIOC_UCRT3	BIOC_UCRT3	https://www.r-project.org/nosvn/winutf8/ucrt3/BIOC_aarch64	TRUE	FALSE	TRUE	FALSE
 CRAN	CRAN	@CRAN@	TRUE	TRUE	TRUE	TRUE
 BioCsoft	"BioC software"	%bm/packages/%v/bioc	FALSE	TRUE	TRUE	TRUE
 BioCann	"BioC annotation"	%bm/packages/%v/data/annotation	FALSE	TRUE	TRUE	TRUE
Index: src/gnuwin32/fixed/etc/Makeconf
===================================================================
--- src/gnuwin32/fixed/etc/Makeconf	(revision 87973)
+++ src/gnuwin32/fixed/etc/Makeconf	(working copy)
@@ -45,13 +45,13 @@
   ifneq ($(strip $(R_CUSTOM_TOOLS_SOFT)),)
     LOCAL_SOFT = $(R_CUSTOM_TOOLS_SOFT)
   else
-    ## The rtools44 installer sets RTOOLS44_HOME (or RTOOLS44_AARCH64_HOME)
+    ## The rtools45 installer sets RTOOLS45_HOME (or RTOOLS45_AARCH64_HOME)
 
-    # INSTALLER-BUILD-x86_64: RTOOLS44_HOME ?= c:/rtools44
-    # INSTALLER-BUILD-x86_64: LOCAL_SOFT = $(subst \,/,$(RTOOLS44_HOME))/x86_64-w64-mingw32.static.posix
+    # INSTALLER-BUILD-x86_64: RTOOLS45_HOME ?= c:/rtools45
+    # INSTALLER-BUILD-x86_64: LOCAL_SOFT = $(subst \,/,$(RTOOLS45_HOME))/x86_64-w64-mingw32.static.posix
 
-    # INSTALLER-BUILD-aarch64: RTOOLS44_HOME ?= c:/rtools44-aarch64
-    # INSTALLER-BUILD-aarch64: LOCAL_SOFT = $(subst \,/,$(RTOOLS44_AARCH64_HOME))/aarch64-w64-mingw32.static.posix
+    # INSTALLER-BUILD-aarch64: RTOOLS45_HOME ?= c:/rtools45-aarch64
+    # INSTALLER-BUILD-aarch64: LOCAL_SOFT = $(subst \,/,$(RTOOLS45_AARCH64_HOME))/aarch64-w64-mingw32.static.posix
   endif
 endif
 R_TOOLS_SOFT ?= $(LOCAL_SOFT)
Index: src/gnuwin32/fixed/etc/Rcmd_environ
===================================================================
--- src/gnuwin32/fixed/etc/Rcmd_environ	(revision 87973)
+++ src/gnuwin32/fixed/etc/Rcmd_environ	(working copy)
@@ -36,8 +36,8 @@
 SED=${SED-sed}
 
 ## keep in step with Rprofile.windows
-# INSTALLER-BUILD-x86_64:R_RTOOLS44_PATH="${RTOOLS44_HOME:-c:/rtools44}/x86_64-w64-mingw32.static.posix/bin;${RTOOLS44_HOME:-c:/rtools44}/usr/bin"
-# INSTALLER-BUILD-aarch64:R_RTOOLS44_PATH="${RTOOLS44_AARCH64_HOME:-c:/rtools44-aarch64}/aarch64-w64-mingw32.static.posix/bin;${RTOOLS44_AARCH64_HOME:-c:/rtools44-aarch64}/usr/bin"
+# INSTALLER-BUILD-x86_64:R_RTOOLS45_PATH="${RTOOLS45_HOME:-c:/rtools45}/x86_64-w64-mingw32.static.posix/bin;${RTOOLS45_HOME:-c:/rtools45}/usr/bin"
+# INSTALLER-BUILD-aarch64:R_RTOOLS45_PATH="${RTOOLS45_AARCH64_HOME:-c:/rtools45-aarch64}/aarch64-w64-mingw32.static.posix/bin;${RTOOLS45_AARCH64_HOME:-c:/rtools45-aarch64}/usr/bin"
 #   trailing slash to protect against trailing backslash in PATH
-# INSTALLER-BUILD:PATH="${R_CUSTOM_TOOLS_PATH:-${R_RTOOLS44_PATH}};${PATH}/"
+# INSTALLER-BUILD:PATH="${R_CUSTOM_TOOLS_PATH:-${R_RTOOLS45_PATH}};${PATH}/"
 
Index: src/gnuwin32/installer/JRins.R
===================================================================
--- src/gnuwin32/installer/JRins.R	(revision 87973)
+++ src/gnuwin32/installer/JRins.R	(working copy)
@@ -30,7 +30,7 @@
     srcdir = gsub("/", "\\", srcdir, fixed = TRUE)
 
     Rver <- readLines("../../../VERSION")[1L]
-    Rver <- sub("Under .*$", "Pre-release", Rver)
+    Rver <- sub("Under .*$", "Pre-release-UCRT3", Rver)
     ## This is now over 2^16, so truncate
     SVN <- sub("Revision: ", "", readLines("../../../SVN-REVISION"))[1L]
     SVN <- as.character(as.numeric(SVN) - 50000L)
Index: src/library/profile/Rprofile.windows
===================================================================
--- src/library/profile/Rprofile.windows	(revision 87973)
+++ src/library/profile/Rprofile.windows	(working copy)
@@ -63,25 +63,25 @@
 
 local({
     # keep in step with Rcmd_environ
-    setRtools44Path <- 0
-    # INSTALLER-BUILD: setRtools44Path <- 1
+    setRtools45Path <- 0
+    # INSTALLER-BUILD: setRtools45Path <- 1
 
-    if (setRtools44Path) {
+    if (setRtools45Path) {
         aarch64 <- FALSE
         # INSTALLER-BUILD-aarch64: aarch64 <- TRUE
 
         if (aarch64) {
-            rthome <- Sys.getenv("RTOOLS44_AARCH64_HOME",
-                                 "c:/rtools44-aarch64")
+            rthome <- Sys.getenv("RTOOLS45_AARCH64_HOME",
+                                 "c:/rtools45-aarch64")
             rtpath <- paste0(rthome, "/aarch64-w64-mingw32.static.posix/bin;",
                              rthome, "/usr/bin")
         } else {
-            rthome <- Sys.getenv("RTOOLS44_HOME", "c:/rtools44")
+            rthome <- Sys.getenv("RTOOLS45_HOME", "c:/rtools45")
             rtpath <- paste0(rthome, "/x86_64-w64-mingw32.static.posix/bin;",
                              rthome, "/usr/bin")
         }
         path <- Sys.getenv("R_CUSTOM_TOOLS_PATH", rtpath)
-        Sys.setenv(R_RTOOLS44_PATH = rtpath)
+        Sys.setenv(R_RTOOLS45_PATH = rtpath)
         Sys.setenv(PATH = paste0(path, ";", Sys.getenv("PATH")))
     }
 })
Index: src/library/tools/R/install.R
===================================================================
--- src/library/tools/R/install.R	(revision 87973)
+++ src/library/tools/R/install.R	(working copy)
@@ -1098,9 +1098,13 @@
             # Installation-time patching was enabled as a temporary measure
             # during the transition from MSVCRT to UCRT, when packages with
             # many reverse dependencies had to be updated to link.
+            #
+            # UCRT3 experimental builds enabled them by default for testing
+            # new versions of Rtools.
 
             # URL or a local directory with patches: ("no" to no patching)
-            it_patches_base <- Sys.getenv("_R_INSTALL_TIME_PATCHES_", "no")
+            it_patches_base <- Sys.getenv("_R_INSTALL_TIME_PATCHES_",
+                "https://www.r-project.org/nosvn/winutf8/ucrt3/patches_aarch64")
 
             # The patches are identified by package name. An index is used
             # to map the name to a directory with patches for a given
