Browse Source

Fix Linux release pipeline which expects to bundle libLLVM*.so

jcmdln 1 year ago
parent
commit
21f9e7f5e5
1 changed files with 5 additions and 2 deletions
  1. 5 2
      build_odin.sh

+ 5 - 2
build_odin.sh

@@ -70,8 +70,11 @@ FreeBSD)
 	;;
 Linux)
 	CXXFLAGS="$CXXFLAGS $($LLVM_CONFIG --cxxflags --ldflags)"
-	LDFLAGS="$LDFLAGS -ldl -Wl,-rpath=$($LLVM_CONFIG --libdir)"
-	LDFLAGS="$LDFLAGS $($LLVM_CONFIG --libs core native --system-libs --libfiles)"
+	LDFLAGS="$LDFLAGS -ldl $($LLVM_CONFIG --libs core native --system-libs --libfiles)"
+	# Copy libLLVM*.so into current directory for linking
+	# NOTE: This is needed by the Linux release pipeline!
+	cp $(readlink -f $($LLVM_CONFIG --libfiles)) ./
+	LDFLAGS="$LDFLAGS -Wl,-rpath=\$ORIGIN"
 	;;
 OpenBSD)
 	CXXFLAGS="$CXXFLAGS $($LLVM_CONFIG --cxxflags --ldflags)"