Fix UpdateChromeANGLE on mac for debug angle

Update script to copy libABSL, libC++ and google_zLIB optionally
Add in check before removing nonexistant  files
Tested by running script after building ANGLE

Bug: angleproject:1944
Change-Id: I532d055b7fc70f58ebd807e7e203e4fa6a86be0e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3466777
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
diff --git a/scripts/update_chrome_angle.py b/scripts/update_chrome_angle.py
index ac0a045..d8941db 100755
--- a/scripts/update_chrome_angle.py
+++ b/scripts/update_chrome_angle.py
@@ -35,14 +35,12 @@
 elif is_macos:
     chrome_folder = '/Applications/Google Chrome Canary.app/Contents/Frameworks/Google Chrome Framework.framework/Libraries'
     libs_to_copy = ['libGLESv2.dylib', 'libEGL.dylib']
-    optional_libs_to_copy = []
+    optional_libs_to_copy = ['libchrome_zlib.dylib', 'libabsl.dylib', 'libc++.dylib']
 
 else:
     # Must be Linux
     chrome_folder = '/opt/google/chrome-unstable'
     libs_to_copy = ['libGLESv2.so', 'libEGL.so']
-    # Optionally copy the following, which are needed for a component build
-    # (i.e. is_component_build = true, which is the default)
     optional_libs_to_copy = ['libchrome_zlib.so', 'libabsl.so', 'libc++.so']
 
 # Find the most recent ANGLE DLLs
@@ -80,7 +78,7 @@
 
 def copy_file(src, dst):
     print(' - ' + src + '   -->   ' + dst)
-    if is_macos:
+    if is_macos and os.path.isfile(dst):
         # For the codesign to work, the original file must be removed
         os.remove(dst)
     shutil.copyfile(src, dst)
@@ -103,6 +101,8 @@
 
 for filename in libs_to_copy:
     do_copy(filename, False)
+# Optionally copy the following, which are needed for a component build
+# (i.e. is_component_build = true, which is the default)
 for filename in optional_libs_to_copy:
     do_copy(filename, True)