mirror of
https://github.com/mstorsjo/llvm-mingw
synced 2026-06-21 14:01:00 +00:00
Revert "build-lldb-mi: Disallow detecting LLVM outside of $LLVM_DIR"
This reverts commit 9e628b0f2d.
If LLVM was built with --disable-dylib, then the individual
LLVM libraries may expose a dependency on zlib. By restricting
the lldb-mi build to detect dependencies outside of $LLVM_DIR,
the build of lldb-mi fails to find zlib, making it impossible to
find all the necessary dependencies, ending up with errors like this:
CMake Error at llvm-mingw/llvm-project/llvm/build-asserts/lib/cmake/llvm/LLVMExports.cmake:55 (set_target_properties):
The link interface of target "LLVMSupport" contains:
ZLIB::ZLIB
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.
Revert this change for now, to allow building lldb-mi against
a non-dylib build of LLVM.
This commit is contained in:
+8
-8
@@ -65,7 +65,7 @@ else
|
||||
esac
|
||||
fi
|
||||
|
||||
LLVM_DIR="$PREFIX"
|
||||
export LLVM_DIR="$PREFIX"
|
||||
|
||||
# Try to find/guess the builddir under the llvm buildtree next by.
|
||||
# If LLVM was built without LLVM_INSTALL_TOOLCHAIN_ONLY, and the LLVM
|
||||
@@ -91,7 +91,7 @@ if [ -d "$LLVM_SRC" ]; then
|
||||
done
|
||||
if [ -n "$DIRS" ]; then
|
||||
dir="$(ls -td $DIRS | head -1)"
|
||||
LLVM_DIR="$LLVM_SRC/$dir"
|
||||
export LLVM_DIR="$LLVM_SRC/$dir"
|
||||
echo Using $LLVM_DIR as LLVM build dir
|
||||
break
|
||||
else
|
||||
@@ -121,13 +121,13 @@ if [ -n "$HOST" ]; then
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
CMAKEFLAGS="$CMAKEFLAGS -DCMAKE_FIND_ROOT_PATH=$LLVM_DIR"
|
||||
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_LIBRARY=ONLY"
|
||||
CMAKEFLAGS="$CMAKEFLAGS -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY"
|
||||
CMAKEFLAGS="$CMAKEFLAGS -DCMAKE_FIND_ROOT_PATH=$LLVM_DIR"
|
||||
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_LIBRARY=ONLY"
|
||||
CMAKEFLAGS="$CMAKEFLAGS -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY"
|
||||
fi
|
||||
|
||||
if [ -n "$MACOS_REDIST" ]; then
|
||||
: ${MACOS_REDIST_ARCHS:=arm64 x86_64}
|
||||
|
||||
Reference in New Issue
Block a user