diff options
author | Renato Golin <renato.golin@linaro.org> | 2017-05-30 09:07:37 +0100 |
---|---|---|
committer | Renato Golin <renato.golin@linaro.org> | 2017-05-30 09:45:23 +0100 |
commit | 7200f9693aeed80dba4ba78e072459fd6e50f0f3 (patch) | |
tree | 326bf2e2773222e130a386a26ca37176a46eb640 | |
parent | 7365a8ab05c211ee916a364db1e035fbcfffffae (diff) |
tcwg-llvm-*: Function to find projects with a branch
Change-Id: Iec34423be746d6267342068037e88e287374ab58
-rwxr-xr-x | tcwg-llvm-build.sh | 3 | ||||
-rwxr-xr-x | tcwg-llvm-common.sh | 19 |
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 |