Commit 832e5297 authored by hans's avatar hans Committed by Commit bot

Roll Clang 223108:231191

Also introduce a build number in the package name, stop versioning
the Blink GC plugin, and remove repackage.sh.

BUG=444089
NOPRESUBMIT=true

Review URL: https://codereview.chromium.org/980523002

Cr-Commit-Position: refs/heads/master@{#319215}
parent d8905bf2
......@@ -61,6 +61,7 @@
#if defined(SANITIZER_COVERAGE)
#include <sanitizer/common_interface_defs.h>
#include <sanitizer/coverage_interface.h>
#endif
const int kGpuTimeout = 10000;
......
......@@ -67,6 +67,7 @@
#if defined(SANITIZER_COVERAGE)
#include <sanitizer/common_interface_defs.h>
#include <sanitizer/coverage_interface.h>
#endif
namespace content {
......
......@@ -651,6 +651,10 @@ ResultExpr RedirectAllSyscallsPolicy::EvaluateSyscall(int sysno) const {
return UnsafeTrap(AllowRedirectedSyscall, NULL);
}
#if !defined(ADDRESS_SANITIZER)
// ASan does not allow changing the signal handler for SIGBUS, and treats it as
// a fatal signal.
int bus_handler_fd_ = -1;
void SigBusHandler(int, siginfo_t* info, void* void_context) {
......@@ -679,6 +683,7 @@ BPF_TEST_C(SandboxBPF, SigBus, RedirectAllSyscallsPolicy) {
BPF_ASSERT(close(fds[1]) == 0);
BPF_ASSERT(c == 0x55);
}
#endif // !defined(ADDRESS_SANITIZER)
BPF_TEST_C(SandboxBPF, SigMask, RedirectAllSyscallsPolicy) {
// Signal masks are potentially tricky to handle. For instance, if we
......
# This line is read by update.sh and other scripts in tools/clang/scripts
# Note: The spaces are significant.
set(LIBRARYNAME BlinkGCPlugin_14)
set(LIBRARYNAME BlinkGCPlugin)
add_llvm_loadable_module("lib${LIBRARYNAME}"
BlinkGCPlugin.cpp
......
......@@ -24,6 +24,7 @@ class Collection;
// Bare-bones visitor.
class EdgeVisitor {
public:
virtual ~EdgeVisitor() {}
virtual void VisitValue(Value*) {}
virtual void VisitRawPtr(RawPtr*) {}
virtual void VisitRefPtr(RefPtr*) {}
......
......@@ -23,6 +23,7 @@ class RecordCache;
class GraphPoint {
public:
GraphPoint() : traced_(false) {}
virtual ~GraphPoint() {}
void MarkTraced() { traced_ = true; }
bool IsProperlyTraced() { return traced_ || !NeedsTracing().IsNeeded(); }
virtual const TracingStatus NeedsTracing() = 0;
......
......@@ -29,6 +29,7 @@ do_testcase() {
flags="$(cat "${3}")"
fi
local output="$("${CLANG_PATH}" -c -Wno-c++11-extensions \
-Wno-inaccessible-base \
-Xclang -load -Xclang "${PLUGIN_PATH}" \
-Xclang -add-plugin -Xclang blink-gc-plugin ${flags} ${1} 2>&1)"
local json="${input%cpp}graph.json"
......
......@@ -13,9 +13,6 @@ if uname -s | grep -q Darwin; then
else
LIBSUFFIX=so
fi
LIBNAME=\
$(grep 'set(LIBRARYNAME' "$SRC_DIR"/tools/clang/blink_gc_plugin/CMakeLists.txt \
| cut -d ' ' -f 2 | tr -d ')')
FLAGS=""
PREFIX="-Xclang -plugin-arg-blink-gc-plugin -Xclang"
......@@ -31,5 +28,5 @@ for arg in "$@"; do
fi
done
echo -Xclang -load -Xclang $CLANG_LIB_PATH/lib$LIBNAME.$LIBSUFFIX \
echo -Xclang -load -Xclang $CLANG_LIB_PATH/libBlinkGCPlugin.$LIBSUFFIX \
-Xclang -add-plugin -Xclang blink-gc-plugin $FLAGS
......@@ -52,6 +52,7 @@ LLVM_BOOTSTRAP_INSTALL_DIR="${LLVM_DIR}/../llvm-bootstrap-install"
LLVM_BUILD_DIR="${THIS_DIR}/../../../third_party/llvm-build"
LLVM_BIN_DIR="${LLVM_BUILD_DIR}/Release+Asserts/bin"
LLVM_LIB_DIR="${LLVM_BUILD_DIR}/Release+Asserts/lib"
STAMP_FILE="${LLVM_DIR}/../llvm-build/cr_build_revision"
echo "Diff in llvm:" | tee buildlog.txt
svn stat "${LLVM_DIR}" 2>&1 | tee -a buildlog.txt
......@@ -86,8 +87,7 @@ fi
"${THIS_DIR}"/update.sh --bootstrap --force-local-build --run-tests \
${extra_flags} 2>&1 | tee -a buildlog.txt
R=$("${LLVM_BIN_DIR}/clang" --version | \
sed -ne 's/clang version .*(trunk \([0-9]*\))/\1/p')
R=$(cat "${STAMP_FILE}")
PDIR=clang-$R
rm -rf $PDIR
......@@ -122,11 +122,7 @@ fi
# Copy plugins. Some of the dylibs are pretty big, so copy only the ones we
# care about.
cp "${LLVM_LIB_DIR}/libFindBadConstructs.${SO_EXT}" $PDIR/lib
BLINKGCPLUGIN_LIBNAME=\
$(grep 'set(LIBRARYNAME' "$THIS_DIR"/../blink_gc_plugin/CMakeLists.txt \
| cut -d ' ' -f 2 | tr -d ')')
cp "${LLVM_LIB_DIR}/lib${BLINKGCPLUGIN_LIBNAME}.${SO_EXT}" $PDIR/lib
cp "${LLVM_LIB_DIR}/libBlinkGCPlugin.${SO_EXT}" $PDIR/lib
if [[ -n "${gcc_toolchain}" ]]; then
# Copy the stdlibc++.so.6 we linked Clang against so it can run.
......@@ -182,3 +178,5 @@ fi
echo To upload, run:
echo gsutil cp -a public-read $PDIR.tgz \
gs://chromium-browser-clang/$PLATFORM/$PDIR.tgz
# FIXME: Warn if the file already exists on the server.
......@@ -26,8 +26,4 @@ LIB_PATH = os.path.join(
'libFindBadConstructs.' + LIBSUFFIX)
print ('-Xclang -load -Xclang %s'
' -Xclang -add-plugin -Xclang find-bad-constructs'
' -Xclang -plugin-arg-find-bad-constructs'
' -Xclang check-weak-ptr-factory-order'
' -Xclang -plugin-arg-find-bad-constructs'
' -Xclang strict-virtual-specifiers') % LIB_PATH
' -Xclang -add-plugin -Xclang find-bad-constructs') % LIB_PATH
#!/bin/bash
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This script will check out llvm and clang, build a full package
# with the latest plugin revisions and then repackage an existing
# clang-package with the new plugin revisions.
# The new package can be uploaded to replace the existing clang
# package at the same clang revision.
THIS_DIR="$(dirname "${0}")"
LLVM_BUILD_DIR="${THIS_DIR}/../../../third_party/llvm-build"
LLVM_TAR_DIR="${LLVM_BUILD_DIR}/Release+Asserts"
LLVM_BIN_DIR="${LLVM_TAR_DIR}/bin"
LLVM_LIB_DIR="${LLVM_TAR_DIR}/lib"
set -eu
if [ "$(uname -s)" = "Darwin" ]; then
PLATFORM=Mac
SO_EXT="dylib"
else
PLATFORM=Linux_x64
SO_EXT="so"
fi
# Build clang with the new plugin revisions.
"$THIS_DIR"/package.sh $@
R=$("${LLVM_BIN_DIR}/clang" --version | \
sed -ne 's/clang version .*(trunk \([0-9]*\))/\1/p')
PDIR=clang-$R
if [ ! -f "$PDIR.tgz" ]; then
echo "Could not find package archive $PDIR.tgz generated by package.sh"
exit 1
fi
# We don't want to change the clang binary, so fetch the current clang
# package and add the plugin shared-libraries to the existing package.
rm -rf $LLVM_BUILD_DIR
"$THIS_DIR"/update.sh
LIBNAME=\
$(grep 'set(LIBRARYNAME' "$THIS_DIR"/../blink_gc_plugin/CMakeLists.txt \
| cut -d ' ' -f 2 | tr -d ')')
LIBFILE=lib$LIBNAME.$SO_EXT
# Check that we are actually creating the plugin at a new revision.
if [ -f "$LLVM_LIB_DIR/$LIBFILE" ]; then
echo "The plugin revision $LIBNAME is already in the existing package."
exit 1
fi
cp $PDIR/lib/$LIBFILE "$LLVM_LIB_DIR/"
if [ "$(uname -s)" = "Darwin" ]; then
tar zcf ${PDIR}_repack.tgz -C "$LLVM_TAR_DIR" bin include lib buildlog.txt
else
tar zcf ${PDIR}_repack.tgz -C "$LLVM_TAR_DIR" bin lib buildlog.txt
fi
echo The clang package has been repackaged with $LIBNAME
echo To upload, run:
echo gsutil cp -a public-read ${PDIR}_repack.tgz \
gs://chromium-browser-clang/$PLATFORM/$PDIR.tgz
This diff is collapsed.
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