diff --git a/build.sh b/build.sh new file mode 100755 index 0000000000000000000000000000000000000000..7b6b7908abbd185a34239ff96f5050a0c51b36d0 --- /dev/null +++ b/build.sh @@ -0,0 +1,198 @@ +#!/bin/bash + +# Tools to use for bootstrapping. +C_COMPILER_PATH=gcc +CXX_COMPILER_PATH=g++ + +# Initialize our own variables: +buildtype=RelWithDebInfo +backends="ARM;AArch64;X86" +enabled_projects="clang;lld;compiler-rt;openmp;clang-tools-extra" +embedded_toolchain="0" +split_dwarf=on +use_ccache="0" +do_install="0" +clean=0 +unit_test="" +install="install" +install_toolchain_only="0" +verbose="" +dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" +build_dir_name="build" +install_dir_name="install" +build_prefix="$dir/$build_dir_name" +install_prefix="$dir/$install_dir_name" + +# Use 8 threads for builds and tests by default. Use more threads if possible, +# but avoid overloading the system by using up to 50% of available cores. +threads=8 +nproc=$(type -p nproc) +if [ -x "$nproc" -a -f /proc/loadavg ]; then + loadavg=$(awk '{printf "%.0f\n", $1}' < /proc/loadavg) + let threads="($($nproc) - $loadavg) / 2" + if [ $threads -le 0 ]; then + threads=1 + fi +fi + +# Exit script on first error. +set -e + +usage() { + cat <> %t.log // RUN: %adb_shell 'cat %device_rundir/%t.log.*' >> %t.log // RUN: FileCheck %s --check-prefix=CHECK-ERROR < %t.log.* +// REQUIRES: x86_64 #include #include diff --git a/compiler-rt/test/lsan/TestCases/malloc_zero.c b/compiler-rt/test/lsan/TestCases/malloc_zero.c index 5c8d1850a0f9abbb9d3d2c981ebc530db844dc45..d6d2db6a62c043b105d3edd292e855c46f964295 100644 --- a/compiler-rt/test/lsan/TestCases/malloc_zero.c +++ b/compiler-rt/test/lsan/TestCases/malloc_zero.c @@ -3,6 +3,7 @@ /// Fails when only leak sanitizer is enabled // UNSUPPORTED: arm-linux, armhf-linux +// REQUIRES: x86_64 #include #include diff --git a/compiler-rt/test/lsan/TestCases/realloc_too_big.c b/compiler-rt/test/lsan/TestCases/realloc_too_big.c index 1a6569b083dcd1254d6effaeda3ca7c1c1dd1c8b..9c0b1304a0c3384ea1446bb4b28943b0a217418f 100644 --- a/compiler-rt/test/lsan/TestCases/realloc_too_big.c +++ b/compiler-rt/test/lsan/TestCases/realloc_too_big.c @@ -3,6 +3,7 @@ /// Fails when only leak sanitizer is enabled // UNSUPPORTED: arm-linux, armhf-linux +// REQUIRES: x86_64 #include #include diff --git a/openmp/runtime/test/ompt/synchronization/masked.c b/openmp/runtime/test/ompt/synchronization/masked.c index 3eb45d9592d8029e405d8523864dbc3dc87b0158..56821492492ce84704fd3bc15eb95d386703ce15 100644 --- a/openmp/runtime/test/ompt/synchronization/masked.c +++ b/openmp/runtime/test/ompt/synchronization/masked.c @@ -2,6 +2,7 @@ // REQUIRES: ompt // GCC generates code that does not call the runtime for the master construct // XFAIL: gcc +// REQUIRES: x86_64 #include "callback.h" #include diff --git a/openmp/runtime/test/ompt/synchronization/master.c b/openmp/runtime/test/ompt/synchronization/master.c index 34ecc522b85ffdcee201eb6f289e6ea241df11a4..60abce8912191a0693bd71428b3099da1ecbad5a 100644 --- a/openmp/runtime/test/ompt/synchronization/master.c +++ b/openmp/runtime/test/ompt/synchronization/master.c @@ -2,6 +2,7 @@ // REQUIRES: ompt // GCC generates code that does not call the runtime for the master construct // XFAIL: gcc +// REQUIRES: x86_64 #define USE_PRIVATE_TOOL 1 #include "callback.h"