diff options
author | Diana Picus <diana.picus@linaro.org> | 2017-12-20 10:35:08 +0100 |
---|---|---|
committer | Diana Picus <diana.picus@linaro.org> | 2017-12-22 16:37:29 +0100 |
commit | 9f75686d11ff62768d6b1f961b19dce174fa3ef3 (patch) | |
tree | fce1e0c9c2d58f0dc473d09f8b42c9cabcd735bd /helpers/llvm-projs | |
parent | 2b3addadf13760cc4d173f9ae642f60865a9ce64 (diff) |
Replace --env with --source-dir
Remove the --env argument, which was compulsory for all subcommands, and
replace it with a --source-dir argument, only for those subcommands that
need it.
We do this for 2 reasons:
* Not all subcommands care about the source directory (e.g. llvm.py
build won't need it)
* llvm.py should not have any knowledge about environments - that
concept only makes sense for the helper scripts. llvm.py should
instead receive very specific info about where the source and build
directories are.
Change-Id: Iffaeef95559e8923bd883d5c51fed8c306287280
Diffstat (limited to 'helpers/llvm-projs')
-rwxr-xr-x | helpers/llvm-projs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/helpers/llvm-projs b/helpers/llvm-projs index f4d5df7..20a1fe6 100755 --- a/helpers/llvm-projs +++ b/helpers/llvm-projs @@ -45,13 +45,14 @@ llvmtool=$progdir/../scripts/llvm.py . llvm-common verify_env repos=$LLVM_ROOT/repos -env=$(dirname $LLVM_SRC) +source_dir=$LLVM_SRC +env=$(dirname $source_dir) # No args, list if [ "$1" = "" ]; then echo "Use $prog -h for options" echo - safe_run python3 $llvmtool --env $env projects + safe_run python3 $llvmtool projects --source-dir $source_dir exit fi @@ -100,7 +101,7 @@ case $opt in shift ;; list) - safe_run python3 $llvmtool --env $env projects + safe_run python3 $llvmtool projects --source-dir $source_dir exit ;; -h) @@ -196,14 +197,14 @@ if [ "$remove" != "" ]; then remove="-r $remove" fi -safe_run python3 $llvmtool --env $env projects --repos $repos $add $remove +safe_run python3 $llvmtool projects --source-dir $source_dir --repos $repos $add $remove if [ -d $env/build ]; then echo "Updating $env/build" - safe_run python3 $llvmtool --env $env configure --build-dir $env/build + safe_run python3 $llvmtool configure --source-dir $source_dir --build-dir $env/build fi if [ -d $env/debug ]; then echo "Updating $env/debug" - safe_run python3 $llvmtool --env $env configure --build-dir $env/debug + safe_run python3 $llvmtool configure --source-dir $source_dir --build-dir $env/debug fi |