Backed out changeset 8d6fd02420f2 (bug 1415689)for failing gtests on request from "decoder" on a CLOSED TREE

--HG--
extra : amend_source : 1a7120da525a636d94dcb584f3b5d6cbacb58014
This commit is contained in:
arthur.iakab 2017-11-21 23:17:30 +02:00
parent 740c32a7eb
commit e651280a79
5 changed files with 4 additions and 129 deletions

View File

@ -1,20 +0,0 @@
{
"llvm_revision": "317840",
"stages": "3",
"build_libcxx": true,
"build_type": "Release",
"assertions": false,
"llvm_repo": "https://llvm.org/svn/llvm-project/llvm/trunk",
"clang_repo": "https://llvm.org/svn/llvm-project/cfe/trunk",
"compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/trunk",
"libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/trunk",
"libcxxabi_repo": "https://llvm.org/svn/llvm-project/libcxxabi/trunk",
"python_path": "/usr/bin/python2.7",
"gcc_dir": "/builds/worker/workspace/build/src/gcc",
"cc": "/builds/worker/workspace/build/src/gcc/bin/gcc",
"cxx": "/builds/worker/workspace/build/src/gcc/bin/g++",
"as": "/builds/worker/workspace/build/src/gcc/bin/gcc",
"patches": [
"find_symbolizer_linux.patch"
]
}

View File

@ -1,58 +0,0 @@
We currently need this patch because ASan only searches PATH to find the
llvm-symbolizer binary to symbolize ASan traces. On testing machines, this
can be installed in PATH easily. However, for e.g. the ASan Nightly Project,
where we ship an ASan build, including llvm-symbolizer, to the user, we
cannot expect llvm-symbolizer to be on PATH. Instead, we should try to look
it up next to the binary. This patch implements the functionality for Linux
only until there is similar functionality provided upstream.
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_file.cc b/compiler-rt/lib/sanitizer_common/sanitizer_file.cc
index cde54bf..8daade1 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_file.cc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_file.cc
@@ -21,6 +21,10 @@
#include "sanitizer_common.h"
#include "sanitizer_file.h"
+#if SANITIZER_LINUX
+#include "sanitizer_posix.h"
+#endif
+
namespace __sanitizer {
void CatastrophicErrorWrite(const char *buffer, uptr length) {
@@ -156,6 +160,34 @@ char *FindPathToBinary(const char *name) {
if (*end == '\0') break;
beg = end + 1;
}
+
+#if SANITIZER_LINUX
+ // If we cannot find the requested binary in PATH, we should try to locate
+ // it next to the binary, in case it is shipped with the build itself
+ // (e.g. llvm-symbolizer shipped with sanitizer build to symbolize on client.
+ if (internal_readlink("/proc/self/exe", buffer.data(), kMaxPathLength) < 0)
+ return nullptr;
+
+ uptr buf_len = internal_strlen(buffer.data());
+
+ /* Avoid using dirname() here */
+ while (buf_len > 0) {
+ if (buffer[buf_len - 1] == '/')
+ break;
+ buf_len--;
+ }
+
+ if (!buf_len)
+ return nullptr;
+
+ if (buf_len + name_len + 1 <= kMaxPathLength) {
+ internal_memcpy(&buffer[buf_len], name, name_len);
+ buffer[buf_len + name_len] = '\0';
+ if (FileExists(buffer.data()))
+ return internal_strdup(buffer.data());
+ }
+#endif
+
return nullptr;
}

View File

@ -479,7 +479,7 @@ linux64-asan/opt:
tooltool-downloads: public
need-xvfb: true
toolchains:
- linux64-clang-6-pre
- linux64-clang
- linux64-gcc
- linux64-rust
- linux64-sccache
@ -512,7 +512,7 @@ linux64-asan-fuzzing/opt:
tooltool-downloads: public
need-xvfb: true
toolchains:
- linux64-clang-6-pre
- linux64-clang-4
- linux64-gcc
- linux64-rust
- linux64-sccache
@ -544,7 +544,7 @@ linux64-asan-reporter/opt:
tooltool-downloads: public
need-xvfb: true
toolchains:
- linux64-clang-6-pre
- linux64-clang-4
- linux64-gcc
- linux64-rust
- linux64-sccache
@ -576,7 +576,7 @@ linux64-asan/debug:
tooltool-downloads: public
need-xvfb: true
toolchains:
- linux64-clang-6-pre
- linux64-clang
- linux64-gcc
- linux64-rust
- linux64-sccache

View File

@ -69,28 +69,6 @@ linux64-clang-5:
toolchains:
- linux64-gcc-4.9
linux64-clang-6-pre:
description: "Clang 6 Pre toolchain build"
treeherder:
kind: build
platform: toolchains/opt
symbol: TL(clang6p)
tier: 1
worker-type: aws-provisioner-v1/gecko-{level}-b-linux
worker:
docker-image: {in-tree: desktop-build}
max-run-time: 7200
run:
using: toolchain-script
script: build-clang-6-pre-linux.sh
resources:
- 'build/build-clang/build-clang.py'
- 'build/build-clang/clang-6-pre-linux64.json'
- 'taskcluster/scripts/misc/tooltool-download.sh'
toolchain-artifact: public/build/clang.tar.xz
toolchains:
- linux64-gcc-4.9
linux64-clang-tidy:
description: "Clang-tidy build"
index:

View File

@ -1,25 +0,0 @@
#!/bin/bash
set -x -e -v
# This script is for building clang for Linux.
WORKSPACE=$HOME/workspace
HOME_DIR=$WORKSPACE/build
UPLOAD_DIR=$HOME/artifacts
cd $HOME_DIR/src
. taskcluster/scripts/misc/tooltool-download.sh
# gets a bit too verbose here
set +x
cd build/build-clang
# |mach python| sets up a virtualenv for us!
../../mach python ./build-clang.py -c clang-6-pre-linux64.json
set -x
# Put a tarball in the artifacts dir
mkdir -p $UPLOAD_DIR
cp clang.tar.* $UPLOAD_DIR