diff options
author | caitkp@chromium.org <caitkp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-16 17:01:35 +0000 |
---|---|---|
committer | caitkp@chromium.org <caitkp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-16 17:01:35 +0000 |
commit | a49dac5e81dc7a504398030e8624368e7d6bc178 (patch) | |
tree | edbfedf74fdfc47f5423163fc03153e281d5050c /build/win | |
parent | 1876f39aee2bcd3231808d48ed5509ff936504d8 (diff) | |
download | chromium_src-a49dac5e81dc7a504398030e8624368e7d6bc178.zip chromium_src-a49dac5e81dc7a504398030e8624368e7d6bc178.tar.gz chromium_src-a49dac5e81dc7a504398030e8624368e7d6bc178.tar.bz2 |
Revert of Make sure Chrome_elf.dll imports are correct and that it the first import of chrome.exe (https://codereview.chromium.org/109483003/)
Reason for revert:
Tests failing on Win x64 bots.
Original issue's description:
> 1. Make sure chrome_elf.dll imports nothing besides kernel32, advapi32, and some msvc libs (DEBUG builds)
> 2. Add gyp action and test to ensure chrome_elf.dll is always the first entry in chrome.exe's import table.
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=242834
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=243048
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=245197
TBR=robertshield@chromium.org,siggi@chromium.org,csharp@chromium.org
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/132613004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245214 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/win')
-rwxr-xr-x | build/win/reorder-imports.py | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/build/win/reorder-imports.py b/build/win/reorder-imports.py deleted file mode 100755 index d320b51..0000000 --- a/build/win/reorder-imports.py +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env python -# Copyright 2014 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import glob -import optparse -import os -import shutil -import subprocess -import sys - -def reorder_imports(input_dir, output_dir): - """Run swapimports.exe on the initial chrome.exe, and write to the output - directory. Also copy over any related files that might be needed - (pdbs, manifests etc.). - """ - input_image = '--input-image=%s' % (os.path.join(input_dir, 'chrome.exe')) - output_image = '--output-image=%s' % (os.path.join(output_dir, 'chrome.exe')) - - swap_exe = os.path.join( - __file__, - '..\\..\\..\\third_party\\syzygy\\binaries\\exe\\swapimport.exe') - subprocess.call( - [swap_exe, input_image, output_image, '--overwrite', 'chrome_elf.dll']) - - for fname in glob.iglob(os.path.join(input_dir, 'chrome.exe.*')): - shutil.copy(fname, os.path.join(output_dir, os.path.basename(fname))) - return 0 - - -def main(argv): - usage = 'reorder_imports.py -i <input_dir> -o <output_dir>' - parser = optparse.OptionParser(usage=usage) - parser.add_option('-i', '--input', help='reorder chrome.exe in DIR', - metavar='DIR') - parser.add_option('-o', '--output', help='write new chrome.exe to DIR', - metavar='DIR') - opts, args = parser.parse_args() - - if not opts.input or not opts.output: - parser.error('Please provide and input and output directory') - return reorder_imports(opts.input, opts.output) - -if __name__ == "__main__": - sys.exit(main(sys.argv[1:])) |