Skip to content

Commit b23440d

Browse files
committed
system-build: fix LLVM linkage type detection on macOS
1 parent f3d54b7 commit b23440d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

system-build.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,11 @@ if [ -z "$LLVM_DIR" ]; then
282282
fi
283283

284284
# detect the link type of LLVM that we use
285-
if [ "$($LLVM_CONFIG --shared-mode --libs)" = "shared" ]; then
285+
if [ "$($LLVM_CONFIG --shared-mode --libs)" = "shared" ] || \
286+
# TODO: $LLVM_CONFIG --shared-mode is broken on macOS:
287+
# https://bugs.llvm.org/show_bug.cgi?id=40252
288+
# This workaround won't be needed when we switch to CMake.
289+
stat "$LLVM_LIB_DIR"/libLLVM.dylib; then
286290
LLVM_DYLIB="on"
287291
else
288292
LLVM_DYLIB="off"

0 commit comments

Comments
 (0)