Commit d60a6a80 authored by Nico's avatar Nico Committed by Commit Bot

Revert "Change to download and build zlib every time, in case a bot happens to die during a build"

This reverts commit c7fc84754ca04cfc4b733e56bf7a383653eaa8a6.

Reason for revert: breaks tot bots, see e.g.
https://logs.chromium.org/logs/chrome/buildbucket/cr-buildbucket.appspot.com/8885810891742311184/+/steps/gclient_runhooks/0/stdout

Original change's description:
> Change to download and build zlib every time, in case a bot happens to die during a build
> 
> Change-Id: I04e3bfcf520eef8b7fe41cfa1cb04e87de413363
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2052585
> Commit-Queue: Amy Huang <[email protected]>
> Reviewed-by: Nico Weber <[email protected]>
> Cr-Commit-Position: refs/heads/[email protected]{#750365}

[email protected],[email protected],[email protected]

Change-Id: I753aaa490176448d2a78a8ea540de3066ac78b39
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2104210Reviewed-by: Nico's avatarNico Weber <[email protected]>
Commit-Queue: Nico Weber <[email protected]>
Cr-Original-Commit-Position: refs/heads/[email protected]{#750417}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0036ac3ddb65608fa0e91fa7cdf0127254766e1f
parent 531ae602
......@@ -236,32 +236,31 @@ def AddGnuWinToPath():
def AddZlibToPath():
"""Download and build zlib, and add to PATH."""
zlib_dir = os.path.join(LLVM_BUILD_TOOLS_DIR, 'zlib-1.2.11')
zip_name = 'zlib-1.2.11.tar.gz'
shutil.rmtree(zlib_dir)
DownloadAndUnpack(CDS_URL + '/tools/' + zip_name, LLVM_BUILD_TOOLS_DIR)
os.chdir(zlib_dir)
# Build zlib.
zlib_files = [
'adler32', 'compress', 'crc32', 'deflate', 'gzclose', 'gzlib', 'gzread',
'gzwrite', 'inflate', 'infback', 'inftrees', 'inffast', 'trees',
'uncompr', 'zutil'
]
cl_flags = [
'/nologo', '/O2', '/DZLIB_DLL', '/c', '/D_CRT_SECURE_NO_DEPRECATE',
'/D_CRT_NONSTDC_NO_DEPRECATE'
]
if not os.path.exists(zlib_dir):
zip_name = 'zlib-1.2.11.tar.gz'
DownloadAndUnpack(CDS_URL + '/tools/' + zip_name, LLVM_BUILD_TOOLS_DIR)
os.chdir(zlib_dir)
zlib_files = [
'adler32', 'compress', 'crc32', 'deflate', 'gzclose', 'gzlib',
'gzread', 'gzwrite', 'inflate', 'infback', 'inftrees', 'inffast',
'trees', 'uncompr', 'zutil'
]
cl_flags = [
'/nologo', '/O2', '/DZLIB_DLL', '/c', '/D_CRT_SECURE_NO_DEPRECATE',
'/D_CRT_NONSTDC_NO_DEPRECATE'
]
RunCommand(
['cl.exe'] + [f + '.c' for f in zlib_files] + cl_flags, msvc_arch='x64')
RunCommand(
['lib.exe'] + [f + '.obj'
for f in zlib_files] + ['/nologo', '/out:zlib.lib'],
msvc_arch='x64')
# Remove the test directory so it isn't found when trying to find
# test.exe.
shutil.rmtree('test')
try:
RunCommand(['cl.exe'] + [f + '.c' for f in zlib_files] + cl_flags,
msvc_arch='x64')
RunCommand(['lib.exe'] + [f + '.obj' for f in zlib_files] +
['/nologo', '/out:zlib.lib'], msvc_arch='x64')
# Remove the test directory so it isn't found when trying to find
# test.exe.
shutil.rmtree('test')
except Exception as e:
print('Failed to build zlib: ' + str(e))
sys.exit(1)
os.environ['PATH'] = zlib_dir + os.pathsep + os.environ.get('PATH', '')
return zlib_dir
......
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