Skip to content

Commit

Permalink
SafeStack: Package SafeStack runtime for Linux
Browse files Browse the repository at this point in the history
Bug: 864705
Change-Id: I8ebce1fd5911f90b8313a27f9d9e11e229ec0b6b
Reviewed-on: https://chromium-review.googlesource.com/1162757
Commit-Queue: Vlad Tsyrklevich <vtsyrklevich@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581690}
  • Loading branch information
vlad902 authored and Commit Bot committed Aug 8, 2018
1 parent 4fc664d commit eeab6d7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/updating_clang.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
gs://chromium-browser-clang/$x/llvmobjdump-$rev.tgz ; \
gsutil.py cp -n -a public-read gs://chromium-browser-clang-staging/$x/llvmcfiverify-$rev.tgz \
gs://chromium-browser-clang/$x/llvmcfiverify-$rev.tgz ; \
gsutil.py cp -n -a public-read gs://chromium-browser-clang-staging/$x/safestack-$rev.tgz \
gs://chromium-browser-clang/$x/safestack-$rev.tgz ; \
gsutil.py cp -n -a public-read gs://chromium-browser-clang-staging/$x/translation_unit-$rev.tgz \
gs://chromium-browser-clang/$x/translation_unit-$rev.tgz ; \
gsutil.py cp -n -a public-read gs://chromium-browser-clang-staging/$x/llvm-code-coverage-$rev.tgz \
Expand Down
18 changes: 18 additions & 0 deletions tools/clang/scripts/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import argparse
import fnmatch
import glob
import itertools
import os
import shutil
Expand Down Expand Up @@ -383,6 +384,23 @@ def main():
filter=PrintTarProgress)
MaybeUpload(args, cfiverifydir, platform)

# Zip up the SafeStack runtime for Linux
safestackdir = 'safestack-' + stamp
shutil.rmtree(safestackdir, ignore_errors=True)
os.makedirs(os.path.join(safestackdir, 'lib'))
for build in glob.glob(os.path.join(LLVM_RELEASE_DIR, 'lib', 'clang', '*')):
version = os.path.basename(build)
dest_dir = os.path.join(safestackdir, 'lib', 'clang', version,
'lib', 'linux')
os.makedirs(dest_dir)
for lib in glob.glob(os.path.join(build, 'lib', 'linux',
'*libclang_rt.safestack*')):
shutil.copy(lib, dest_dir)
with tarfile.open(safestackdir + '.tgz', 'w:gz') as tar:
tar.add(os.path.join(safestackdir, 'lib'), arcname='lib',
filter=PrintTarProgress)
MaybeUpload(args, safestackdir, platform)

# On Mac, lld isn't part of the main zip. Upload it in a separate zip.
if sys.platform == 'darwin':
llddir = 'lld-' + stamp
Expand Down

0 comments on commit eeab6d7

Please sign in to comment.