summaryrefslogtreecommitdiff
path: root/tcwg-llvm-release.sh
diff options
context:
space:
mode:
authorRenato Golin <renato.golin@linaro.org>2017-05-12 12:41:57 +0100
committerRenato Golin <renato.golin@linaro.org>2017-05-12 12:58:35 +0000
commit2e125142f39db30aeb5e5a3ec065b23ba1758c6b (patch)
treeb1b990d197367e4f2d2e25d3a0db8c4eb113213d /tcwg-llvm-release.sh
parent4a4333cff0ec42eabf5e54b3ab223f8dc4c8c59f (diff)
tcwg-llvm-*: Add compiler option, setting CC/CXX
In addition to an external toolchain, we also want to control which system compiler is to be used. If an option is passed, that will be the set into CC/CXX and used by the scripts in the same way an external toolchain would. Change-Id: I25366c6c3c725ead1667d7b8828b1100e5e925d3
Diffstat (limited to 'tcwg-llvm-release.sh')
-rwxr-xr-xtcwg-llvm-release.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/tcwg-llvm-release.sh b/tcwg-llvm-release.sh
index 751f8549..01159022 100755
--- a/tcwg-llvm-release.sh
+++ b/tcwg-llvm-release.sh
@@ -18,7 +18,8 @@ SYN_CANDIDATE="--candidate=N (or 'final')"
SYN_BUILDJOBS="--buildjobs=N (def. CPUS)"
SYN_TOOLCHAIN="--toolchain=http://url/for/tarball"
SYN_TOOLCHAIN_FILE="--toolchain-file=<file-name> (file name to copy the produced toolchain file name)"
-SYNTAX="$0 $SYN_WORKSPACE $SYN_RELEASE $SYN_CANDIDATE $SYN_TOOLCHAIN $SYN_TOOLCHAIN_FILE"
+SYN_COMPILER="--compiler=clang|gcc"
+SYNTAX="$0 $SYN_WORKSPACE $SYN_RELEASE $SYN_CANDIDATE $SYN_TOOLCHAIN $SYN_TOOLCHAIN_FILE $SYN_COMPILER"
# Environment Variables and default values
WORKSPACE=$(pwd)
@@ -31,8 +32,6 @@ CPUS=$(nproc --all)
BUILDJOBS=$CPUS
TOOLCHAIN=""
TOOLCHAIN_FILE=""
-CC=""
-CXX=""
# Command line parsing
while [ "$#" -gt 0 ]; do
@@ -85,6 +84,9 @@ while [ "$#" -gt 0 ]; do
--toolchain)
download_toolchain "$WORKSPACE" "$VAL"
shift ;;
+ --compiler)
+ set_compiler "$VAL"
+ shift ;;
--toolchain-file)
if [ "$VAL" != "" ]; then
TOOLCHAIN_FILE="$VAL"