Skip to content

Commit

Permalink
Add llvm-objcopy to the clang package on Linux.
Browse files Browse the repository at this point in the history
This is so that it can be used to extract partitions from multi-partition
binaries during the Android build, as described here:

http://lld.llvm.org/Partitions.html

Increases uncompressed package size by 2.7MB and compressed package size
by 1.0MB.

Bug: 972701
Change-Id: Idb19169054ca02d12f713d89a81e4fbdaa10acf8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1647117
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#668898}
  • Loading branch information
Peter Collingbourne authored and Commit Bot committed Jun 13, 2019
1 parent 42fa251 commit ddaabb8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions tools/clang/scripts/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ def main():
# Add llvm-ar for LTO.
'bin/llvm-ar',

# Add llvm-objcopy for partition extraction on Android.
'bin/llvm-objcopy',

# AddressSanitizer C runtime (pure C won't link with *_cxx).
'lib/clang/$V/lib/linux/libclang_rt.asan-i386.a',
'lib/clang/$V/lib/linux/libclang_rt.asan-x86_64.a',
Expand Down Expand Up @@ -396,6 +399,7 @@ def main():
if sys.platform.startswith('linux'):
stripped_binaries.append('lld')
stripped_binaries.append('llvm-ar')
stripped_binaries.append('llvm-objcopy')
for f in stripped_binaries:
if sys.platform != 'win32':
subprocess.call(['strip', os.path.join(pdir, 'bin', f)])
Expand Down
2 changes: 1 addition & 1 deletion tools/clang/scripts/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
# Reverting problematic clang rolls is safe, though.
CLANG_REVISION = '80fee25776c2fb61e74c1ecb1a523375c2500b69'
CLANG_SVN_REVISION = '362913'
CLANG_SUB_REVISION = 1
CLANG_SUB_REVISION = 2

PACKAGE_VERSION = '%s-%s-%s' % (CLANG_SVN_REVISION, CLANG_REVISION[:8],
CLANG_SUB_REVISION)
Expand Down

0 comments on commit ddaabb8

Please sign in to comment.