From 603a48af9479ad119a4526a80ac24c866c2bc1c9 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Thu, 27 Sep 2012 17:01:57 -0500
Subject: [PATCH] Yet another attempt at deleting tcmalloc

---
 indra/newview/viewer_manifest.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 175c6f99035..87366caf1b7 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]
-- 
GitLab