Copy local CRT DLLs to gn output directories

When DEPOT_TOOLS_WIN_TOOLCHAIN=0 it is assumed that the developer has a
local install of Visual Studio, and therefore the CRT DLLs don't need to
be copied to the output directory in order to run binaries. However,
when creating packages for running elsewhere (isolates or the
mini_installer) those DLLs are needed. In order to avoid special cases
elsewhere this change copies them to the output directories when 'gn gen'
or 'gn args' runs.

This change also makes the newly copied files writable so that they can
easily be deleted. For backwards compatibility it also makes the files
writable before deleting them. This avoids a problem with pgort140.dll
which can end up read-only and thus impossible to copy over or delete
without first removing the read-only flag.

This change also removes the need for create_installer_archive.py to
copy CRT DLLs, which should avoid bugs with over-copying of these DLLs.
This change also updates that script to say that ucrtbase*.dll is
required.

BUG=611934,585556, 610336

Review-Url: https://codereview.chromium.org/2021353003
Cr-Commit-Position: refs/heads/master@{#397189}


CrOS-Libchrome-Original-Commit: e7bd0348e692e635c039328cd06aac1ce23b7d4f
1 file changed
tree: a1559f48c90651ded8f531ad970112947f3d5856
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/