Commit 96d692b3 authored by Sebastien Marchand's avatar Sebastien Marchand Committed by Commit Bot

Remove zap_timestamp and the Syzygy deps

This isn't needed anymore as we're now using LLD.

Bug: 804926, 821764
Change-Id: I3c6e4ce0793997823b89978cf7eda5b3a26399b8
Reviewed-on: https://chromium-review.googlesource.com/1108185Reviewed-by: default avatarSigurður Ásgeirsson <siggi@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Sébastien Marchand <sebmarchand@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580239}
parent 1fffcaa3
...@@ -1920,21 +1920,6 @@ hooks = [ ...@@ -1920,21 +1920,6 @@ hooks = [
'-d', 'src/tools/luci-go/linux64', '-d', 'src/tools/luci-go/linux64',
], ],
}, },
# Pull the Syzygy binaries, used for optimization and instrumentation.
# Remove this as soon as the zap_timestamp.exe utility is no longer used.
# See https://crbug.com/821764#c3.
{
'name': 'syzygy-binaries',
'pattern': '.',
'condition': 'host_os == "win"',
'action': ['python',
'src/build/get_syzygy_binaries.py',
'--output-dir=src/third_party/syzygy/binaries',
'--revision=8164b24ebde9c5649c9a09e88a7fc0b0fcbd1bc5',
'--overwrite',
'--copy-dia-binaries',
],
},
{ {
'name': 'apache_win32', 'name': 'apache_win32',
'pattern': '\\.sha1', 'pattern': '\\.sha1',
......
This diff is collapsed.
[ [
"base_i18n_nacl_win64.dll",
"base_win64.dll",
"crypto_nacl_win64.dll",
"ipc_win64.dll",
"latency_info_nacl_win64.dll",
"nacl64.exe",
"ppapi_shared_win64.dll"
] ]
...@@ -21,11 +21,6 @@ import zipfile ...@@ -21,11 +21,6 @@ import zipfile
BASE_DIR = os.path.dirname(os.path.abspath(__file__)) BASE_DIR = os.path.dirname(os.path.abspath(__file__))
SRC_DIR = os.path.dirname(os.path.dirname(BASE_DIR)) SRC_DIR = os.path.dirname(os.path.dirname(BASE_DIR))
# Files that can't be processed by zap_timestamp.exe.
_ZAP_TIMESTAMP_BLACKLIST = {
'mini_installer.exe',
}
def build_bitness(build_dir): def build_bitness(build_dir):
# This function checks whether the target (not host) word size is 64-bits. # This function checks whether the target (not host) word size is 64-bits.
...@@ -58,7 +53,7 @@ def build_bitness(build_dir): ...@@ -58,7 +53,7 @@ def build_bitness(build_dir):
def get_files_to_clean(build_dir, recursive=False): def get_files_to_clean(build_dir, recursive=False):
"""Get the list of files to clean.""" """Get the list of files to clean."""
allowed = frozenset( allowed = frozenset(
('', '.app', '.dll', '.dylib', '.exe', '.nexe', '.so')) ('', '.app', '.dylib', '.nexe', '.so'))
non_x_ok_exts = frozenset(('.isolated', '.jar')) non_x_ok_exts = frozenset(('.isolated', '.jar'))
min_timestamp = 0 min_timestamp = 0
if os.path.exists(os.path.join(build_dir, 'build.ninja')): if os.path.exists(os.path.join(build_dir, 'build.ninja')):
...@@ -81,32 +76,6 @@ def get_files_to_clean(build_dir, recursive=False): ...@@ -81,32 +76,6 @@ def get_files_to_clean(build_dir, recursive=False):
return ret_files return ret_files
def run_zap_timestamp(filepath):
"""Run zap_timestamp.exe on a PE binary."""
assert sys.platform == 'win32'
syzygy_dir = os.path.join(
SRC_DIR, 'third_party', 'syzygy', 'binaries', 'exe')
zap_timestamp_exe = os.path.join(syzygy_dir, 'zap_timestamp.exe')
sys.stdout.write('Processing: %s\n' % os.path.basename(filepath))
proc = subprocess.Popen(
[zap_timestamp_exe, '--input-image=%s' % filepath, '--overwrite'],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
log, _ = proc.communicate()
if proc.returncode != 0:
sys.stderr.write('%s failed:\n%s\n' % (os.path.basename(filepath), log))
return proc.returncode
def remove_pe_metadata(filename, bitness):
"""Remove the build metadata from a PE file."""
# Only run zap_timestamp on the 32-bit PE files for which we have a PDB.
ret = 0
if ((not os.path.basename(filename) in _ZAP_TIMESTAMP_BLACKLIST) and
os.path.exists(filename + '.pdb') and bitness != 64):
ret = run_zap_timestamp(filename)
return ret
def remove_zip_timestamps(filename): def remove_zip_timestamps(filename):
"""Remove the timestamps embedded in a zip archive.""" """Remove the timestamps embedded in a zip archive."""
sys.stdout.write('Processing: %s\n' % os.path.basename(filename)) sys.stdout.write('Processing: %s\n' % os.path.basename(filename))
...@@ -133,10 +102,7 @@ def remove_metadata_worker(file_queue, failed_queue, build_dir, bitness): ...@@ -133,10 +102,7 @@ def remove_metadata_worker(file_queue, failed_queue, build_dir, bitness):
"""Worker thread for the remove_metadata function.""" """Worker thread for the remove_metadata function."""
while True: while True:
f = file_queue.get() f = file_queue.get()
if f.endswith(('.dll', '.exe')): if f.endswith('.jar'):
if remove_pe_metadata(os.path.join(build_dir, f), bitness):
failed_queue.put(f)
elif f.endswith('.jar'):
remove_zip_timestamps(os.path.join(build_dir, f)) remove_zip_timestamps(os.path.join(build_dir, f))
file_queue.task_done() file_queue.task_done()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment