build-lldb-mi: Disallow detecting LLVM outside of $LLVM_DIR
Do the same as when cross compiling; disallow detecting dependencies outside of the given CMAKE_FIND_ROOT_PATH. Don't export LLVM_DIR as we no longer need to pass it implicitly that way. This makes the errors clearer, if LLVM isn't found where expected, instead of misdetecting it from a different installation of LLVM in the system. If lldb-mi would try to find other optional dependencies, they would no longer be found; this was already the case when cross compiling though.
This commit is contained in:
1 parent
d69ccd33a7
commit
9e628b0f2d
1 file changed
+3
-3
+3
-3
@@ -65,7 +65,7 @@ else
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export LLVM_DIR="$PREFIX"
|
LLVM_DIR="$PREFIX"
|
||||||
|
|
||||||
# Try to find/guess the builddir under the llvm buildtree next by.
|
# Try to find/guess the builddir under the llvm buildtree next by.
|
||||||
# If LLVM was built without LLVM_INSTALL_TOOLCHAIN_ONLY, and the LLVM
|
# If LLVM was built without LLVM_INSTALL_TOOLCHAIN_ONLY, and the LLVM
|
||||||
@@ -91,7 +91,7 @@ if [ -d "$LLVM_SRC" ]; then
|
|||||||
done
|
done
|
||||||
if [ -n "$DIRS" ]; then
|
if [ -n "$DIRS" ]; then
|
||||||
dir="$(ls -td $DIRS | head -1)"
|
dir="$(ls -td $DIRS | head -1)"
|
||||||
export LLVM_DIR="$LLVM_SRC/$dir"
|
LLVM_DIR="$LLVM_SRC/$dir"
|
||||||
echo Using $LLVM_DIR as LLVM build dir
|
echo Using $LLVM_DIR as LLVM build dir
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
@@ -121,13 +121,13 @@ if [ -n "$HOST" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
CMAKEFLAGS="$CMAKEFLAGS -DCMAKE_FIND_ROOT_PATH=$LLVM_DIR"
|
CMAKEFLAGS="$CMAKEFLAGS -DCMAKE_FIND_ROOT_PATH=$LLVM_DIR"
|
||||||
CMAKEFLAGS="$CMAKEFLAGS -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER"
|
CMAKEFLAGS="$CMAKEFLAGS -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER"
|
||||||
CMAKEFLAGS="$CMAKEFLAGS -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY"
|
CMAKEFLAGS="$CMAKEFLAGS -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY"
|
||||||
CMAKEFLAGS="$CMAKEFLAGS -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY"
|
CMAKEFLAGS="$CMAKEFLAGS -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY"
|
||||||
CMAKEFLAGS="$CMAKEFLAGS -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY"
|
CMAKEFLAGS="$CMAKEFLAGS -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY"
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$MACOS_REDIST" ]; then
|
if [ -n "$MACOS_REDIST" ]; then
|
||||||
: ${MACOS_REDIST_ARCHS:=arm64 x86_64}
|
: ${MACOS_REDIST_ARCHS:=arm64 x86_64}
|
||||||
|
|||||||
Reference in new issue
Block a user