mirror of
https://github.com/dart-lang/sdk
synced 2024-10-06 13:08:01 +00:00
[infra] Enhance Alpine Linux sysroot support
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>
This commit is contained in:
parent
87cf921fec
commit
2ea4fbea1f
|
@ -8,6 +8,19 @@ On Alpine Linux, run the script directly:
|
||||||
./build/linux/alpine_sysroot_scripts/install-sysroot.sh
|
./build/linux/alpine_sysroot_scripts/install-sysroot.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
By default, the script installs sysroots for the following architectures:
|
||||||
|
|
||||||
|
- `aarch64`
|
||||||
|
- `armv7`
|
||||||
|
- `x86_64`
|
||||||
|
- `x86`
|
||||||
|
|
||||||
|
To install sysroots for specific architectures, you can run:
|
||||||
|
|
||||||
|
``` sh
|
||||||
|
./build/linux/alpine_sysroot_scripts/install-sysroot.sh aarch64 riscv64 x86_64 ...
|
||||||
|
```
|
||||||
|
|
||||||
On other linux systems, you can run the script with Alpine Linux container:
|
On other linux systems, you can run the script with Alpine Linux container:
|
||||||
|
|
||||||
``` sh
|
``` sh
|
||||||
|
|
|
@ -20,9 +20,8 @@ SCRIPT="$(readlink -f -- "$0")"
|
||||||
|
|
||||||
WORKDIR="$(dirname -- "$(dirname -- "$SCRIPT")")"
|
WORKDIR="$(dirname -- "$(dirname -- "$SCRIPT")")"
|
||||||
|
|
||||||
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" <<'EOF'
|
if test $# -eq 0; then
|
||||||
aarch64
|
set aarch64 armv7 x86_64 x86
|
||||||
armv7
|
fi
|
||||||
x86
|
|
||||||
x86_64
|
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"
|
||||||
EOF
|
|
||||||
|
|
Loading…
Reference in a new issue