diff --git a/build.sh b/build.sh index 6aea9dd0a1e7..e739d7f231dc 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 $? 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