Skip to content
This repository was archived by the owner on Apr 25, 2023. It is now read-only.

Commit 809dabb

Browse files
packaging: Minor script improvements. (#87)
- Use --platform linux/amd64; otherwise Docker on Mac uses aarch64 Linux. - Print dylibs being used for debugging.
1 parent 970476e commit 809dabb

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

clang-tools-extra/lsif-clang/package/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ GIT_COMMIT_SHA="$(git rev-parse --short HEAD)"
2525
# Build
2626
cd "$ROOT_DIR"
2727
echo "[Building image: $IMAGE_NAME]"
28-
docker build -f Bundled_Ubuntu1804.Dockerfile -t "$IMAGE_NAME" .
28+
docker build -f Bundled_Ubuntu1804.Dockerfile -t "$IMAGE_NAME" . --platform linux/amd64
2929

3030
# Start a container with the image
3131
echo "[Starting temporary container: $CONTAINER_NAME]"

clang-tools-extra/lsif-clang/package/copy_needed_dynamic_libs.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ OUTPUT="$2"
2222
# 2. The system libraries maintained backwards compatibility.
2323
# (It seems OK to roll with this assumption. We've manually
2424
# verified it for Ubuntu 18.04 -> Ubuntu 20.04)
25-
for LIB in $(ldd "$BINARY" | cut -d ">" -f 2 | awk '{print $1}' | grep -vE "(linux-vdso\.|ld-linux-x86-64\.|libc\.|librt\.|libpthread\.)"); do
25+
DYN_LIBS="$(ldd "$BINARY")"
26+
echo "Dynamic libraries linked by lsif-clang:"
27+
echo "$DYN_LIBS"
28+
for LIB in $(echo "$DYN_LIBS" | cut -d ">" -f 2 | awk '{print $1}' | grep -vE "(linux-vdso\.|ld-linux-x86-64\.|libc\.|librt\.|libpthread\.)"); do
2629
cp --verbose "$LIB" "$OUTPUT/"
2730
done

0 commit comments

Comments
 (0)