summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorwfh@chromium.org <wfh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-21 23:54:50 +0000
committerwfh@chromium.org <wfh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-21 23:54:50 +0000
commit4093453f6d0fe84191d1439a4e5349a04c629439 (patch)
tree08f07b642830095200c979bf958e3f91dba063ac /base
parente8e32234b7ea681eeafd706f68d09e26a1f85632 (diff)
downloadchromium_src-4093453f6d0fe84191d1439a4e5349a04c629439.zip
chromium_src-4093453f6d0fe84191d1439a4e5349a04c629439.tar.gz
chromium_src-4093453f6d0fe84191d1439a4e5349a04c629439.tar.bz2
fixes to pre_libc.py script to correctly strip x64
object files from libcmt during 64bit build BUG=166496 Review URL: https://chromiumcodereview.appspot.com/12303010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183908 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/allocator/allocator.gyp1
-rwxr-xr-xbase/allocator/prep_libc.py26
2 files changed, 18 insertions, 9 deletions
diff --git a/base/allocator/allocator.gyp b/base/allocator/allocator.gyp
index 78aa7aa..52420cf 100644
--- a/base/allocator/allocator.gyp
+++ b/base/allocator/allocator.gyp
@@ -521,6 +521,7 @@
'prep_libc.py',
'$(VCInstallDir)lib',
'<(SHARED_INTERMEDIATE_DIR)/allocator',
+ '<(target_arch)',
],
},
],
diff --git a/base/allocator/prep_libc.py b/base/allocator/prep_libc.py
index d421983..cbffacb 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',