1
0
mirror of https://github.com/dart-lang/sdk synced 2024-07-01 07:14:29 +00:00

[infra] Update alpine sysroot

Closes https://github.com/dart-lang/sdk/pull/55255

GitOrigin-RevId: d754c894720403f1a4c712855ed3fc718b6d2d06
Change-Id: I577f03977025156f14dc7207c0a50fde6fc0c10c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358860
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
This commit is contained in:
なつき 2024-03-21 10:43:15 +00:00 committed by Commit Queue
parent 6f4e0b403c
commit 867610409a
3 changed files with 8 additions and 14 deletions

6
build/.gitignore vendored
View File

@ -1,8 +1,2 @@
# Generated file containing information about the VS toolchain on Windows.
win_toolchain.json
# Pulled linux sysroots.
# Regex to prevent large when comparing checkouts with commits in which the
# sysroot has been rolled.
linux/alpine-linux-**-sysroot
linux/debian_**-sysroot

View File

@ -19,18 +19,18 @@ if (is_linux) {
if (dart_sysroot == "alpine") {
if (current_cpu == "x86") {
target_sysroot =
rebase_path("//build/linux/alpine-linux-x86-sysroot", root_build_dir)
rebase_path("//buildtools/sysroot/alpine-linux-x86", root_build_dir)
} else if (current_cpu == "x64") {
target_sysroot = rebase_path("//build/linux/alpine-linux-x86_64-sysroot",
target_sysroot = rebase_path("//buildtools/sysroot/alpine-linux-x86_64",
root_build_dir)
} else if (current_cpu == "arm") {
target_sysroot = rebase_path("//build/linux/alpine-linux-armv7-sysroot",
target_sysroot = rebase_path("//buildtools/sysroot/alpine-linux-armv7",
root_build_dir)
} else if (current_cpu == "arm64") {
target_sysroot = rebase_path("//build/linux/alpine-linux-aarch64-sysroot",
target_sysroot = rebase_path("//buildtools/sysroot/alpine-linux-aarch64",
root_build_dir)
} else if (current_cpu == "riscv64") {
target_sysroot = rebase_path("//build/linux/alpine-linux-riscv64-sysroot",
target_sysroot = rebase_path("//buildtools/sysroot/alpine-linux-riscv64",
root_build_dir)
} else {
print("There is no $dart_sysroot sysroot present for $current_cpu")

View File

@ -2,7 +2,7 @@
# Install Alpine sysroots for building with musl libc.
#
# Sysroots will be installed into //build/linux/alpine-linux-$arch-sysroot
# Sysroots will be installed into //buildtools/sysroot/alpine-linux-$arch
#
# Architectures to be installed can be configured at the end of the script
#
@ -18,10 +18,10 @@ fi
SCRIPT="$(readlink -f -- "$0")"
WORKDIR="$(dirname -- "$(dirname -- "$SCRIPT")")"
WORKDIR="$(dirname -- "$(dirname -- "$(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"
echo "$@" | xargs -n 1 -- sh -xc 'apk add --root "$1/buildtools/sysroot/alpine-linux-$2" --repositories-file /etc/apk/repositories --allow-untrusted --arch "$2" --no-cache --no-scripts --initdb -- build-base linux-headers' -- "$WORKDIR"