Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3088)

Unified Diff: base/allocator/prep_libc.py

Issue 12303010: fixes to libcmt stripper to correctly strip x64 objects (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changes to prep_libc to supply target_arch on command line instead of via output directory Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/allocator/allocator.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/allocator/prep_libc.py
diff --git a/base/allocator/prep_libc.py b/base/allocator/prep_libc.py
index d4219830fb430f2e258a12b1c4027fd48875c4ef..cbffacb688e99bbd406fc03da6c1255bb1a17081 100755
--- a/base/allocator/prep_libc.py
+++ b/base/allocator/prep_libc.py
@@ -7,12 +7,12 @@
# This script takes libcmt.lib for VS2005/08/10 and removes the allocation
# related functions from it.
#
-# Usage: prep_libc.py <VCInstallDir> <OutputDir>
-#
-# VCInstallDir is the path where VC is installed, something like:
-# C:\Program Files\Microsoft Visual Studio 8\VC\
+# Usage: prep_libc.py <VCLibDir> <OutputDir> <arch>
#
+# VCLibDir is the path where VC is installed, something like:
+# C:\Program Files\Microsoft Visual Studio 8\VC\lib
# OutputDir is the directory where the modified libcmt file should be stored.
+# arch is either 'ia32' or 'x64'
import os
import shutil
@@ -31,20 +31,28 @@ def run(command, filter=None):
return popen.returncode
def main():
+ bindir = 'SELF_X86'
+ objdir = 'INTEL'
vs_install_dir = sys.argv[1]
outdir = sys.argv[2]
- if "x64" in sys.argv[2]:
+ if "x64" in sys.argv[3]:
+ bindir = 'SELF_64_amd64'
+ objdir = 'amd64'
vs_install_dir = os.path.join(vs_install_dir, 'amd64')
output_lib = os.path.join(outdir, 'libcmt.lib')
shutil.copyfile(os.path.join(vs_install_dir, 'libcmt.lib'), output_lib)
shutil.copyfile(os.path.join(vs_install_dir, 'libcmt.pdb'),
os.path.join(outdir, 'libcmt.pdb'))
+
vspaths = [
'build\\intel\\mt_obj\\',
- 'f:\\dd\\vctools\\crt_bld\\SELF_X86\\crt\\src\\build\\INTEL\\mt_obj\\',
- 'F:\\dd\\vctools\\crt_bld\\SELF_X86\\crt\\src\\build\\INTEL\\mt_obj\\nativec\\\\',
- 'F:\\dd\\vctools\\crt_bld\\SELF_X86\\crt\\src\\build\\INTEL\\mt_obj\\nativecpp\\\\',
- ]
+ 'f:\\dd\\vctools\\crt_bld\\' + bindir + \
+ '\\crt\\src\\build\\' + objdir + '\\mt_obj\\',
+ 'F:\\dd\\vctools\\crt_bld\\' + bindir + \
+ '\\crt\\src\\build\\' + objdir + '\\mt_obj\\nativec\\\\',
+ 'F:\\dd\\vctools\\crt_bld\\' + bindir + \
+ '\\crt\\src\\build\\' + objdir + '\\mt_obj\\nativecpp\\\\' ]
+
objfiles = ['malloc', 'free', 'realloc', 'new', 'delete', 'new2', 'delete2',
'align', 'msize', 'heapinit', 'expand', 'heapchk', 'heapwalk',
'heapmin', 'sbheap', 'calloc', 'recalloc', 'calloc_impl',
« no previous file with comments | « base/allocator/allocator.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698