summaryrefslogtreecommitdiff
path: root/tcwg_kernel-build.sh
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2018-12-11 14:07:03 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2018-12-12 09:44:22 +0000
commit1187c164a885d9d6d7dc01364d33d5d295c58512 (patch)
treec4e89d244856aa6577e3148d0c8d3b3373e08fe9 /tcwg_kernel-build.sh
parent80a6ec676e8e41ed679c2bed471f2c1500ca788c (diff)
tcwg_kernel-build.sh: Make build_abe_1 depend only on ${rr[]}
rr[target]="$target" Change-Id: Ie0807b4c57f67f34c0363ea322ca42b4d0c56bfe
Diffstat (limited to 'tcwg_kernel-build.sh')
-rwxr-xr-xtcwg_kernel-build.sh25
1 files changed, 12 insertions, 13 deletions
diff --git a/tcwg_kernel-build.sh b/tcwg_kernel-build.sh
index 72ac4c88..65434ef8 100755
--- a/tcwg_kernel-build.sh
+++ b/tcwg_kernel-build.sh
@@ -40,14 +40,12 @@ if $verbose2; then set -x; fi
trap "eval \"echo ERROR at \${FUNCNAME[0]}:\${BASH_LINENO[0]}\" > ${rr[top_artifacts]}/failures" EXIT
if [ x"$target" = x"native" ]; then
- rr[target]=$(uname -m)
-else
- rr[target]=$target
+ target=$(uname -m)
fi
# Baseline branch name for current configuration. These branches are
# present in all above git repos.
-rr[baseline_branch]="linaro-local/ci/tcwg_kernel/$toolchain-${rr[${toolchain}_version]}-${rr[target]}-${rr[linux_version]}-$linux_config"
+rr[baseline_branch]="linaro-local/ci/tcwg_kernel/$toolchain-${rr[${toolchain}_version]}-$target-${rr[linux_version]}-$linux_config"
# We are not going to push any results for a one-off build.
if [ x"$current_project" = x"none" ]; then
@@ -102,6 +100,7 @@ rr[current_project]="$current_project"
rr[current_rev]="$current_rev"
rr[git_read_only]="$git_read_only"
rr[mode]="$mode"
+rr[target]="$target"
# Reset artifacts to an empty state. ${rr[top_artifacts]}/results is the most
# important artifact, since it records the metric of how successful the build
@@ -269,7 +268,7 @@ build_abe_1 ()
cd abe
local gnu_target
- gnu_target=$(print_gnu_target $target)
+ gnu_target=$(print_gnu_target ${rr[target]})
# Remove previous build directories and .stamp files.
# We rely on ccache for fast rebuilds.
@@ -377,7 +376,7 @@ EOF
mkdir -p llvm-build
cd llvm-build
- cmake -G Ninja ../llvm-src -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=True -DCMAKE_INSTALL_PREFIX=../llvm-install -DLLVM_TARGETS_TO_BUILD=$(print_llvm_target $target)
+ cmake -G Ninja ../llvm-src -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=True -DCMAKE_INSTALL_PREFIX=../llvm-install -DLLVM_TARGETS_TO_BUILD=$(print_llvm_target ${rr[target]})
ccache -z
ninja
ninja install
@@ -421,7 +420,7 @@ build_linux ()
;;
gnu)
bin="$(pwd)/abe/builds/destdir/x86_64-unknown-linux-gnu/bin"
- cc="$bin/$(print_gnu_target $target)-gcc"
+ cc="$bin/$(print_gnu_target ${rr[target]})-gcc"
;;
esac
@@ -434,17 +433,17 @@ build_linux ()
if [ x"${rr[mode]}" = x"bisect" -a x"${rr[current_project]}" = x"linux" ]; then
ccache="ccache"
fi
- cat > $(pwd)/bin/$target-cc <<EOF
+ cat > $(pwd)/bin/${rr[target]}-cc <<EOF
#!/bin/sh
exec $ccache $cc "\$@"
EOF
- chmod +x $(pwd)/bin/$target-cc
+ chmod +x $(pwd)/bin/${rr[target]}-cc
# Define make variables.
- opts="CC=$(pwd)/bin/$target-cc"
- if [ x"$target" != x"native" ]; then
- opts="$opts ARCH=$(print_kernel_target $target)"
- opts="$opts CROSS_COMPILE=$(print_gnu_target $target)-"
+ opts="CC=$(pwd)/bin/${rr[target]}-cc"
+ if [ x"${rr[target]}" != x"$(uname -m)" ]; then
+ opts="$opts ARCH=$(print_kernel_target ${rr[target]})"
+ opts="$opts CROSS_COMPILE=$(print_gnu_target ${rr[target]})-"
opts="$opts HOSTCC=gcc"
fi