From bf9de3f67eb62f651c019f1b24e7df841f2bb70c Mon Sep 17 00:00:00 2001 From: Tomas Weinfurt Date: Wed, 16 Aug 2017 10:22:59 -0700 Subject: [PATCH 1/2] add option to specify clang and few minor improvements --- build-managed.sh | 2 +- build-native.sh | 2 +- build.sh | 11 +++++++---- config.json | 6 ++++++ src/Native/build-native.sh | 6 ++++++ 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/build-managed.sh b/build-managed.sh index 34fa4539b68a..b0d649bb2df9 100755 --- a/build-managed.sh +++ b/build-managed.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash working_tree_root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -$working_tree_root/run.sh build-managed $* +$working_tree_root/run.sh build-managed "$@" exit $? diff --git a/build-native.sh b/build-native.sh index a9bfabf0e0d9..24d037a38d7d 100755 --- a/build-native.sh +++ b/build-native.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash working_tree_root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" #The Run Command Tool is calling src/Native/build-native.sh -$working_tree_root/run.sh build-native $* +$working_tree_root/run.sh build-native "$@" exit $? diff --git a/build.sh b/build.sh index 6aea9dd0a1e7..408744b4fc6e 100755 --- a/build.sh +++ b/build.sh @@ -17,14 +17,17 @@ usage() echo } -if [ "$1" == "-?" ]; then +if [ "$1" == "-?" ] || [ "$1" == "-h" ]; then usage + if [ "$1" == "-h" ]; then + set -- "-?" + fi fi __scriptpath=$(cd "$(dirname "$0")"; pwd -P) __workingDir=$(pwd -P) -if [ "$1" != "" ]; then +if [ "$1" != "" ] && [[ "$1" != -* ]]; then if [ -d $__workingDir/$1 ]; then $__scriptpath/run.sh build-directory -directory:$__workingDir/$* exit $? @@ -35,10 +38,10 @@ if [ "$1" != "" ]; then fi fi -"$__scriptpath/build-native.sh" $* +"$__scriptpath/build-native.sh" "$@" if [ $? -ne 0 ];then exit 1 fi -"$__scriptpath/build-managed.sh" -BuildPackages=true $* +"$__scriptpath/build-managed.sh" -BuildPackages=true "$@" exit $? diff --git a/config.json b/config.json index 5d568358276b..44fe6989e27b 100644 --- a/config.json +++ b/config.json @@ -246,6 +246,12 @@ "values": [], "defaultValue": "Please-Specify-A-Directory" }, + "Clang": { + "description": "Specific version of Clang to use e.g. clang3.7, clang3.8, etc ...", + "valueType": "property", + "values": [], + "defaultValue": "" + }, }, "commands": { "build-directory": { diff --git a/src/Native/build-native.sh b/src/Native/build-native.sh index 3f8de3f29936..397608e19a26 100755 --- a/src/Native/build-native.sh +++ b/src/Native/build-native.sh @@ -284,6 +284,12 @@ while :; do generateversion) __generateversionsource=true ;; + --clang*) + # clangx.y or clang-x.y + v=`echo $lowerI | tr -d '[:alpha:]-='` + __ClangMajorVersion=`echo $v | cut -d '.' -f1` + __ClangMinorVersion=`echo $v | cut -d '.' -f2` + ;; clang3.5) __ClangMajorVersion=3 __ClangMinorVersion=5 From 2116b68e1ba623283a9ce69e058fcced70211f75 Mon Sep 17 00:00:00 2001 From: Tomas Weinfurt Date: Thu, 17 Aug 2017 10:06:42 -0700 Subject: [PATCH 2/2] roll-back $* $@ change. that should be separate PR --- build-managed.sh | 2 +- build-native.sh | 2 +- build.sh | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build-managed.sh b/build-managed.sh index b0d649bb2df9..34fa4539b68a 100755 --- a/build-managed.sh +++ b/build-managed.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash working_tree_root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -$working_tree_root/run.sh build-managed "$@" +$working_tree_root/run.sh build-managed $* exit $? diff --git a/build-native.sh b/build-native.sh index 24d037a38d7d..a9bfabf0e0d9 100755 --- a/build-native.sh +++ b/build-native.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash working_tree_root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" #The Run Command Tool is calling src/Native/build-native.sh -$working_tree_root/run.sh build-native "$@" +$working_tree_root/run.sh build-native $* exit $? diff --git a/build.sh b/build.sh index 408744b4fc6e..e739d7f231dc 100755 --- a/build.sh +++ b/build.sh @@ -38,10 +38,10 @@ if [ "$1" != "" ] && [[ "$1" != -* ]]; then fi fi -"$__scriptpath/build-native.sh" "$@" +"$__scriptpath/build-native.sh" $* if [ $? -ne 0 ];then exit 1 fi -"$__scriptpath/build-managed.sh" -BuildPackages=true "$@" +"$__scriptpath/build-managed.sh" -BuildPackages=true $* exit $?