Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: tools/clang/scripts/package.sh

Issue 11946043: When building Clang for Mac, make LC_ID_DYLIB of the ASan dynamic runtime to be relative to @execut… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # This script will check out llvm and clang, and then package the results up 6 # This script will check out llvm and clang, and then package the results up
7 # to a tgz file. 7 # to a tgz file.
8 8
9 THIS_DIR="$(dirname "${0}")" 9 THIS_DIR="$(dirname "${0}")"
10 LLVM_DIR="${THIS_DIR}/../../../third_party/llvm" 10 LLVM_DIR="${THIS_DIR}/../../../third_party/llvm"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 else 57 else
58 cp "${LLVM_LIB_DIR}/libFindBadConstructs.so" $PDIR/lib 58 cp "${LLVM_LIB_DIR}/libFindBadConstructs.so" $PDIR/lib
59 fi 59 fi
60 60
61 # Copy built-in headers (lib/clang/3.2/include). 61 # Copy built-in headers (lib/clang/3.2/include).
62 # libcompiler-rt puts all kinds of libraries there too, but we want only ASan. 62 # libcompiler-rt puts all kinds of libraries there too, but we want only ASan.
63 if [ "$(uname -s)" = "Darwin" ]; then 63 if [ "$(uname -s)" = "Darwin" ]; then
64 # Keep only Release+Asserts/lib/clang/3.2/lib/darwin/libclang_rt.asan_osx.a 64 # Keep only Release+Asserts/lib/clang/3.2/lib/darwin/libclang_rt.asan_osx.a
65 find "${LLVM_LIB_DIR}/clang" -type f -path '*lib/darwin*' | grep -v asan | \ 65 find "${LLVM_LIB_DIR}/clang" -type f -path '*lib/darwin*' | grep -v asan | \
66 xargs rm 66 xargs rm
67 # Fix LC_ID_DYLIB for the ASan dynamic library to be relative to
68 # @executable_path.
69 # TODO(glider): this is transitional. We'll need to fix the dylib name
70 # either in our build system, or in Clang. See also http://crbug.com/170629.
71 ASAN_DYLIB_NAME=libclang_rt.asan_osx_dynamic.dylib
72 ASAN_DYLIB=$(find "${LLVM_LIB_DIR}/clang" -type f -path "*${ASAN_DYLIB_NAME}")
73 install_name_tool -id @executable_path/${ASAN_DYLIB_NAME} "${ASAN_DYLIB}"
67 else 74 else
68 # Keep only 75 # Keep only
69 # Release+Asserts/lib/clang/3.2/lib/linux/libclang_rt.{asan,tsan}-x86_64.a 76 # Release+Asserts/lib/clang/3.2/lib/linux/libclang_rt.{asan,tsan}-x86_64.a
70 # TODO(thakis): Make sure the 32bit version of ASan runtime is kept too once 77 # TODO(thakis): Make sure the 32bit version of ASan runtime is kept too once
71 # that's built. TSan runtime exists only for 64 bits. 78 # that's built. TSan runtime exists only for 64 bits.
72 find "${LLVM_LIB_DIR}/clang" -type f -path '*lib/linux*' | \ 79 find "${LLVM_LIB_DIR}/clang" -type f -path '*lib/linux*' | \
73 grep -v "asan\|tsan" | xargs rm 80 grep -v "asan\|tsan" | xargs rm
74 fi 81 fi
75 82
76 cp -R "${LLVM_LIB_DIR}/clang" $PDIR/lib 83 cp -R "${LLVM_LIB_DIR}/clang" $PDIR/lib
77 84
78 tar zcf $PDIR.tgz -C $PDIR bin lib buildlog.txt 85 tar zcf $PDIR.tgz -C $PDIR bin lib buildlog.txt
79 86
80 if [ "$(uname -s)" = "Darwin" ]; then 87 if [ "$(uname -s)" = "Darwin" ]; then
81 PLATFORM=Mac 88 PLATFORM=Mac
82 else 89 else
83 PLATFORM=Linux_x64 90 PLATFORM=Linux_x64
84 fi 91 fi
85 92
86 echo To upload, run: 93 echo To upload, run:
87 echo gsutil cp -a public-read $PDIR.tgz \ 94 echo gsutil cp -a public-read $PDIR.tgz \
88 gs://chromium-browser-clang/$PLATFORM/$PDIR.tgz 95 gs://chromium-browser-clang/$PLATFORM/$PDIR.tgz
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698