Skip to content

Commit 6a2d235

Browse files
committed
Revert "build-lldb-mi: Disallow detecting LLVM outside of $LLVM_DIR"
This reverts commit 9e628b0. 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.
1 parent 04bc2bc commit 6a2d235

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

build-lldb-mi.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ else
6565
esac
6666
fi
6767

68-
LLVM_DIR="$PREFIX"
68+
export LLVM_DIR="$PREFIX"
6969

7070
# Try to find/guess the builddir under the llvm buildtree next by.
7171
# If LLVM was built without LLVM_INSTALL_TOOLCHAIN_ONLY, and the LLVM
@@ -91,7 +91,7 @@ if [ -d "$LLVM_SRC" ]; then
9191
done
9292
if [ -n "$DIRS" ]; then
9393
dir="$(ls -td $DIRS | head -1)"
94-
LLVM_DIR="$LLVM_SRC/$dir"
94+
export LLVM_DIR="$LLVM_SRC/$dir"
9595
echo Using $LLVM_DIR as LLVM build dir
9696
break
9797
else
@@ -121,13 +121,13 @@ if [ -n "$HOST" ]; then
121121
exit 1
122122
;;
123123
esac
124-
fi
125124

126-
CMAKEFLAGS="$CMAKEFLAGS -DCMAKE_FIND_ROOT_PATH=$LLVM_DIR"
127-
CMAKEFLAGS="$CMAKEFLAGS -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER"
128-
CMAKEFLAGS="$CMAKEFLAGS -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY"
129-
CMAKEFLAGS="$CMAKEFLAGS -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY"
130-
CMAKEFLAGS="$CMAKEFLAGS -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY"
125+
CMAKEFLAGS="$CMAKEFLAGS -DCMAKE_FIND_ROOT_PATH=$LLVM_DIR"
126+
CMAKEFLAGS="$CMAKEFLAGS -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER"
127+
CMAKEFLAGS="$CMAKEFLAGS -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY"
128+
CMAKEFLAGS="$CMAKEFLAGS -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY"
129+
CMAKEFLAGS="$CMAKEFLAGS -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY"
130+
fi
131131

132132
if [ -n "$MACOS_REDIST" ]; then
133133
: ${MACOS_REDIST_ARCHS:=arm64 x86_64}

0 commit comments

Comments
 (0)