Commit 809e1812 authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

mac: Let clang updater pull mac packages on all hosts.

...similar to what we do for Windows.

This is to pick up:
- include/c++/v1 to pick up libc++ headers for the very few targets
  that use system libc++ (which on macOS assumes that library headers
  are bundled with the compiler), like gcapi
- libclang_rt.osx.a for __isPlatformVersionAtLeast (needed everywhere)

Bug: 1147069
Change-Id: I9da25218686466c29b171ca959bbe5a529cccfdc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2542183
Auto-Submit: Nico Weber <thakis@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Reviewed-by: default avatarHans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#828131}
parent 18dac5f7
...@@ -178,12 +178,28 @@ def DownloadAndUnpackPackage(package_file, output_dir, host_os): ...@@ -178,12 +178,28 @@ def DownloadAndUnpackPackage(package_file, output_dir, host_os):
sys.exit(1) sys.exit(1)
def DownloadAndUnpackClangMacRuntime(output_dir):
cds_file = "clang-%s.tgz" % PACKAGE_VERSION
cds_full_url = GetPlatformUrlPrefix('mac') + cds_file
path_prefixes = [
'lib/clang/' + RELEASE_VERSION + '/lib/darwin', 'include/c++/v1'
]
try:
DownloadAndUnpack(cds_full_url, output_dir, path_prefixes)
except URLError:
print('Failed to download prebuilt clang %s' % cds_file)
print('Use build.py if you want to build locally.')
print('Exiting.')
sys.exit(1)
# TODO(hans): Create a clang-win-runtime package instead. # TODO(hans): Create a clang-win-runtime package instead.
def DownloadAndUnpackClangWinRuntime(output_dir): def DownloadAndUnpackClangWinRuntime(output_dir):
cds_file = "clang-%s.tgz" % PACKAGE_VERSION cds_file = "clang-%s.tgz" % PACKAGE_VERSION
cds_full_url = GetPlatformUrlPrefix('win') + cds_file cds_full_url = GetPlatformUrlPrefix('win') + cds_file
path_prefixes = [ 'lib/clang/' + RELEASE_VERSION + '/lib/', path_prefixes = [
'bin/llvm-symbolizer.exe' ] 'lib/clang/' + RELEASE_VERSION + '/lib/windows', 'bin/llvm-symbolizer.exe'
]
try: try:
DownloadAndUnpack(cds_full_url, output_dir, path_prefixes) DownloadAndUnpack(cds_full_url, output_dir, path_prefixes)
except URLError: except URLError:
...@@ -256,6 +272,8 @@ def UpdatePackage(package_name, host_os): ...@@ -256,6 +272,8 @@ def UpdatePackage(package_name, host_os):
DownloadAndUnpackPackage(package_file, LLVM_BUILD_DIR, host_os) DownloadAndUnpackPackage(package_file, LLVM_BUILD_DIR, host_os)
if package_name == 'clang' and 'mac' in target_os:
DownloadAndUnpackClangMacRuntime(LLVM_BUILD_DIR)
if package_name == 'clang' and 'win' in target_os: if package_name == 'clang' and 'win' in target_os:
# When doing win/cross builds on other hosts, get the Windows runtime # When doing win/cross builds on other hosts, get the Windows runtime
# libraries, and llvm-symbolizer.exe (needed in asan builds). # libraries, and llvm-symbolizer.exe (needed in asan builds).
......
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