diff --git a/README_OE.md b/README_OE.md new file mode 100644 index 0000000000000000000000000000000000000000..af956a923c04130b3e648c282c8f8719f20f36c7 --- /dev/null +++ b/README_OE.md @@ -0,0 +1,21 @@ + 我们提供了build.sh脚本来构建llvm-project。 + 我们已经验证了它可以在openEuler系统成功构建。 + + 在构建编译器之前,确保已经安装了以下工具: + gcc \ + g++ \ + libgcc \ + openssl-devel \ + cmake \ + python3 \ + python3-setuptools \ + python-wheel \ + texinfo \ + binutils \ + libstdc++-static \ + libatomic + + 具体的编译选项可以在build.sh中查看,也可以通过“./build.sh -h”命令查看。 + 例如: + ./build.sh -r -b release -X X86 + diff --git a/build.sh b/build.sh new file mode 100755 index 0000000000000000000000000000000000000000..4fed7989a657b7859fbcb795f589345d7acbf5be --- /dev/null +++ b/build.sh @@ -0,0 +1,164 @@ +#!/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" +split_dwarf=on +use_ccache="0" +do_install="0" +clean=0 +unit_test="" +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 bb1316024b5cb8ad55b2788fe2fc3ef5c8912e48..ad0c0a78e154e1a13ad4e13cb33677bc5c283aaf 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/tools/archer/tests/races/critical-unrelated.c b/openmp/tools/archer/tests/races/critical-unrelated.c index bff8b9763c1496bddcc596247527506896dc1580..1a4d39a72362e9f75db07b34b6884683d7bac2dc 100644 --- a/openmp/tools/archer/tests/races/critical-unrelated.c +++ b/openmp/tools/archer/tests/races/critical-unrelated.c @@ -13,6 +13,8 @@ // RUN: %libarcher-compile-and-run-race | FileCheck %s // RUN: %libarcher-compile-and-run-race-noserial | FileCheck %s // REQUIRES: tsan +// REQUIRES: x86_64 + #include #include diff --git a/openmp/tools/archer/tests/races/lock-nested-unrelated.c b/openmp/tools/archer/tests/races/lock-nested-unrelated.c index e24b4cdedc71b5d86d0b24df5d79a3de760c9bac..13b6e3417458716ceda676048958d1778c3a6d70 100644 --- a/openmp/tools/archer/tests/races/lock-nested-unrelated.c +++ b/openmp/tools/archer/tests/races/lock-nested-unrelated.c @@ -13,6 +13,7 @@ // RUN: %libarcher-compile-and-run-race | FileCheck %s // RUN: %libarcher-compile-and-run-race-noserial | FileCheck %s // REQUIRES: tsan +// REQUIRES: x86_64 #include #include diff --git a/openmp/tools/archer/tests/races/lock-unrelated.c b/openmp/tools/archer/tests/races/lock-unrelated.c index 4245490a703f33f399e86f3d3fbbac1b6f2e64f7..891549ff91ff30a1d9bc54e23ef57559d00ec43d 100644 --- a/openmp/tools/archer/tests/races/lock-unrelated.c +++ b/openmp/tools/archer/tests/races/lock-unrelated.c @@ -13,6 +13,8 @@ // RUN: %libarcher-compile-and-run-race | FileCheck %s // RUN: %libarcher-compile-and-run-race-noserial | FileCheck %s // REQUIRES: tsan +// REQUIRES: x86_64 + #include #include diff --git a/openmp/tools/archer/tests/races/parallel-simple.c b/openmp/tools/archer/tests/races/parallel-simple.c index 700e4a7f3313fd2773ce2119eeb3f3c837a4a759..809ef6f4c114c64b8cbaf8c829b05cf6fe27da38 100644 --- a/openmp/tools/archer/tests/races/parallel-simple.c +++ b/openmp/tools/archer/tests/races/parallel-simple.c @@ -13,6 +13,8 @@ // RUN: %libarcher-compile-and-run-race | FileCheck %s // RUN: %libarcher-compile-and-run-race-noserial | FileCheck %s // REQUIRES: tsan +// REQUIRES: x86_64 + #include #include diff --git a/openmp/tools/archer/tests/races/task-dependency.c b/openmp/tools/archer/tests/races/task-dependency.c index f6496ac8596d80b1ef646a915873f51e01c83106..63b4cf4bfc569c1e0fd1654872184c29ceda9d74 100644 --- a/openmp/tools/archer/tests/races/task-dependency.c +++ b/openmp/tools/archer/tests/races/task-dependency.c @@ -13,6 +13,8 @@ // RUN: %libarcher-compile-and-run-race | FileCheck %s // RUN: %libarcher-compile-and-run-race-noserial | FileCheck %s // REQUIRES: tsan +// REQUIRES: x86_64 + #include "ompt/ompt-signal.h" #include #include diff --git a/openmp/tools/archer/tests/races/task-taskgroup-unrelated.c b/openmp/tools/archer/tests/races/task-taskgroup-unrelated.c index 04b2957b48637f49e979f76dc89b153f9947b0cb..770e31c8f831f9c35424ea574e79c8bdcec99830 100644 --- a/openmp/tools/archer/tests/races/task-taskgroup-unrelated.c +++ b/openmp/tools/archer/tests/races/task-taskgroup-unrelated.c @@ -13,6 +13,8 @@ // RUN: %libarcher-compile-and-run-race | FileCheck %s // RUN: %libarcher-compile-and-run-race-noserial | FileCheck %s // REQUIRES: tsan +// REQUIRES: x86_64 + #include "ompt/ompt-signal.h" #include #include diff --git a/openmp/tools/archer/tests/races/task-taskwait-nested.c b/openmp/tools/archer/tests/races/task-taskwait-nested.c index 02f1fb576c8706877c7de36a3c5c86efb30a2b1b..64aa03f3f8db283602fa8f0ed3965d1a305f6a35 100644 --- a/openmp/tools/archer/tests/races/task-taskwait-nested.c +++ b/openmp/tools/archer/tests/races/task-taskwait-nested.c @@ -13,6 +13,8 @@ // RUN: %libarcher-compile-and-run-race | FileCheck %s // RUN: %libarcher-compile-and-run-race-noserial | FileCheck %s // REQUIRES: tsan +// REQUIRES: x86_64 + #include "ompt/ompt-signal.h" #include #include diff --git a/openmp/tools/archer/tests/races/task-two.c b/openmp/tools/archer/tests/races/task-two.c index 06d5bc021ee65adc06206352cd887942c053bc1c..f1fa654b2da9e9ffd1edf035acdfccd80b009793 100644 --- a/openmp/tools/archer/tests/races/task-two.c +++ b/openmp/tools/archer/tests/races/task-two.c @@ -13,6 +13,8 @@ // RUN: %libarcher-compile-and-run-race | FileCheck %s // RUN: %libarcher-compile-and-run-race-noserial | FileCheck %s // REQUIRES: tsan +// REQUIRES: x86_64 + #include #include #include diff --git a/openmp/tools/archer/tests/task/task_late_fulfill.c b/openmp/tools/archer/tests/task/task_late_fulfill.c index 31d096deec75693789fe030a651055b888884d14..23f54eeb9b57f2703d30f12d199f8e78b2257f86 100644 --- a/openmp/tools/archer/tests/task/task_late_fulfill.c +++ b/openmp/tools/archer/tests/task/task_late_fulfill.c @@ -10,6 +10,7 @@ // icc compiler does not support detach clause. // UNSUPPORTED: icc // REQUIRES: tsan +// REQUIRES: x86_64 #include #include