2ea4fbea1f
Closes https://github.com/dart-lang/sdk/pull/52663 GitOrigin-RevId: 0f78e2bd9260597b5a06876217e2e03e1f2e420c Change-Id: I015c9989a59a97c792df883201cd722c2dfc20cb Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308420 Reviewed-by: Alexander Thomas <athom@google.com> Commit-Queue: Alexander Thomas <athom@google.com>
28 lines
876 B
Bash
Executable File
28 lines
876 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Install Alpine sysroots for building with musl libc.
|
|
#
|
|
# Sysroots will be installed into //build/linux/alpine-linux-$arch-sysroot
|
|
#
|
|
# Architectures to be installed can be configured at the end of the script
|
|
#
|
|
# List of available architectures can be found at:
|
|
# https://pkgs.alpinelinux.org/packages?name=alpine-base
|
|
|
|
set -e
|
|
|
|
if test ! -f /etc/alpine-release; then
|
|
echo "Error: This script must be run directly on alpine linux or inside alpine linux container." >&2
|
|
exit 1
|
|
fi
|
|
|
|
SCRIPT="$(readlink -f -- "$0")"
|
|
|
|
WORKDIR="$(dirname -- "$(dirname -- "$SCRIPT")")"
|
|
|
|
if test $# -eq 0; then
|
|
set aarch64 armv7 x86_64 x86
|
|
fi
|
|
|
|
echo "$@" | xargs -n 1 -- sh -xc 'apk add --root "$1/alpine-linux-$2-sysroot" --repositories-file /etc/apk/repositories --allow-untrusted --arch "$2" --no-cache --no-scripts --initdb -- alpine-base alpine-sdk linux-headers' -- "$WORKDIR"
|