Separate install directory for each worktree
The install directory will be <Worktree>/install, right next to the build and
source dirs, and it will be exported in LLVM_INSTALL.
Note that this won't affect existing worktree directories, you should either
nuke the build directories or manually update CMakeCache.txt for them.
Change-Id: I8bb80f8d86d9d2f8d02940fbbd8a2c8b5b1a05e3
diff --git a/helpers/llvm-build b/helpers/llvm-build
index 40c42e2..7e00b2b 100755
--- a/helpers/llvm-build
+++ b/helpers/llvm-build
@@ -13,7 +13,7 @@
## CMD line options and defaults
CPUs=`grep -c proc /proc/cpuinfo`
build_dir=$LLVM_BLD
-install_dir=$LLVM_BLD/../../install
+install_dir=$LLVM_INSTALL
build_type=Release
shared=
targets=
diff --git a/helpers/llvm-env b/helpers/llvm-env
index f293adb..50c4c81 100755
--- a/helpers/llvm-env
+++ b/helpers/llvm-env
@@ -123,6 +123,8 @@
llvm_build_dir=$LLVM_ROOT/$branch/debug
fi
+llvm_install_dir=$LLVM_ROOT/$branch/install
+
if [ "$clean" = true ]; then
.llvm-env-remove $llvm_dir $llvm_worktree_dir
else
@@ -146,6 +148,7 @@
export LLVM_SRC=$llvm_worktree_dir
export LLVM_BLD=$llvm_build_dir
+export LLVM_INSTALL=$llvm_install_dir
export LLVM_DEBUG=$debug_build # For llvm-build to know
# Make it possible to undo changes to the PATH: we export an LLVM_OLD_PATH, and