diff options
Diffstat (limited to 'helpers')
-rwxr-xr-x | helpers/llvm-build | 6 | ||||
-rwxr-xr-x | helpers/llvm-common | 5 | ||||
-rwxr-xr-x | helpers/llvm-prepare | 3 |
3 files changed, 6 insertions, 8 deletions
diff --git a/helpers/llvm-build b/helpers/llvm-build index 8d2fab4..5b4f27d 100755 --- a/helpers/llvm-build +++ b/helpers/llvm-build @@ -61,10 +61,10 @@ fi ## Choose between make and ninja make=make -ninja= +generator="Unix Makefiles" if which ninja 2>&1 > /dev/null; then make=ninja - ninja="-G Ninja" + generator="Ninja" fi ## Debug mode, make it lighter @@ -83,7 +83,7 @@ cd $build_dir ## Re-run CMake file files are damaged / not there if [ ! -f build.ninja ] && [ ! -f Makefile ]; then echo " + Configuring Build" - safe_run cmake $ninja $LLVM_SRC \ + safe_run cmake -G "$generator" $LLVM_SRC \ -DCMAKE_BUILD_TYPE=$build_type \ -DLLVM_BUILD_TESTS=True \ -DLLVM_ENABLE_ASSERTIONS=True \ diff --git a/helpers/llvm-common b/helpers/llvm-common index 5cf3f4a..d7de48f 100755 --- a/helpers/llvm-common +++ b/helpers/llvm-common @@ -43,10 +43,9 @@ get_branches() { } safe_run() { - CMD="$*" - $CMD + "$@" if [[ $? != 0 ]]; then - echo "'$CMD' failed, bailing out" + echo "'$@' failed, bailing out" exit 1 fi } diff --git a/helpers/llvm-prepare b/helpers/llvm-prepare index a6cd8cf..babc77c 100755 --- a/helpers/llvm-prepare +++ b/helpers/llvm-prepare @@ -11,12 +11,11 @@ function prepare() { src=$1 origin=$2 svn=$3 - dir=`basename $src` # Clone Linaro repo if [ ! -d $src/.git ]; then mkdir -p $src cd $src/.. - safe_run git clone $origin $dir + safe_run git clone $origin $src fi # Link with upstream SVN if [[ $LLVM_GITRW = 'yes' && ! -d $src/.git/svn ]]; then |