diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 175c6f99035fab4cb35a4a2d257db1c893caf150..87366caf1b7e0294d4ba430e26e54a157762a947 100644
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -404,9 +404,11 @@ def construct(self):
             self.path("libhunspell.dll")
 
             # For google-perftools tcmalloc allocator.
-            # no longer used, make sure old .dll is removed
             try:
-                self.remove(self.dst_path_of('libtcmalloc_minimal.dll'))
+                if self.args['configuration'].lower() == 'debug':
+                    self.path('libtcmalloc_minimal-debug.dll')
+                else:
+                    self.path('libtcmalloc_minimal.dll')
             except:
                 print "Skipping libtcmalloc_minimal.dll"
 
@@ -535,6 +537,10 @@ def wpath(path):
                 result += 'File ' + pkg_file + '\n'
             else:
                 result += 'Delete ' + wpath(os.path.join('$INSTDIR', rel_file)) + '\n'
+
+        if install
+            result += 'Delete ' + wpath(os.path.join('$INSTDIR', 'libtcmalloc_minimal.dll')) + '\n'
+
         # at the end of a delete, just rmdir all the directories
         if not install:
             deleted_file_dirs = [os.path.dirname(pair[1].replace(self.get_dst_prefix()+os.path.sep,'')) for pair in self.file_list]