summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtcwg-llvm-build.sh3
-rwxr-xr-xtcwg-llvm-common.sh19
2 files changed, 19 insertions, 3 deletions
diff --git a/tcwg-llvm-build.sh b/tcwg-llvm-build.sh
index e52791bd..80ce5063 100755
--- a/tcwg-llvm-build.sh
+++ b/tcwg-llvm-build.sh
@@ -211,9 +211,6 @@ LOGBASE="$WORKSPACE/tcwg-llvm"
LOGEXT="txt"
# Checkout
-LLVM_PROJECTS="llvm: clang:tools/clang lld:tools/lld
- compiler-rt:projects/compiler-rt libunwind:projects/libunwind
- libcxx:projects/libcxx libcxxabi:projects/libcxxabi"
LLVM_REVS=""
CLONE_STATUS=0
{
diff --git a/tcwg-llvm-common.sh b/tcwg-llvm-common.sh
index c7139b73..9115e5a3 100755
--- a/tcwg-llvm-common.sh
+++ b/tcwg-llvm-common.sh
@@ -4,6 +4,7 @@
# - Creating tarball names, URLs
# - Downloading toolchains, recognising compilers
# - Generic board attributes (cores, memory, etc)
+# FIXME: Most of this logic should go to the LLVM scripts
# Verify and download the toolchain, if any
download_toolchain() {
@@ -130,6 +131,24 @@ is_in_list() {
return 1
}
+# This list is used in every place we need info about the projects
+LLVM_PROJECTS="llvm: clang:tools/clang lld:tools/lld
+ compiler-rt:projects/compiler-rt libunwind:projects/libunwind
+ libcxx:projects/libcxx libcxxabi:projects/libcxxabi"
+# List all projects with a branch
+list_branch_projects() {
+ local BRANCH="$1"
+ local PROJECTS=()
+ local REP="https://git-us.linaro.org/toolchain/llvm"
+ for proj_ref in $LLVM_PROJECTS; do
+ proj="$(echo "$proj_ref" | cut -d ":" -f 1)"
+ if has_remote_branch "$REP/$proj.git" "$BRANCH"; then
+ PROJECTS+=("$proj")
+ fi
+ done
+ echo "${PROJECTS[@]}"
+}
+
# Environment Variables and default values
CPUS=$(nproc --all)
# We may use between 500MB and 1GB per link job