From 867610409a571f9a8848d46fb949745ef0d29e18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Thu, 21 Mar 2024 10:43:15 +0000 Subject: [PATCH] [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 Commit-Queue: Slava Egorov --- build/.gitignore | 6 ------ build/config/sysroot.gni | 10 +++++----- build/linux/alpine_sysroot_scripts/install-sysroot.sh | 6 +++--- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/build/.gitignore b/build/.gitignore index 4d36d780536..32da1af733a 100644 --- a/build/.gitignore +++ b/build/.gitignore @@ -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 diff --git a/build/config/sysroot.gni b/build/config/sysroot.gni index 675ab4b718d..2a6cab96af9 100644 --- a/build/config/sysroot.gni +++ b/build/config/sysroot.gni @@ -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") diff --git a/build/linux/alpine_sysroot_scripts/install-sysroot.sh b/build/linux/alpine_sysroot_scripts/install-sysroot.sh index ca87b35477e..3751064fd14 100755 --- a/build/linux/alpine_sysroot_scripts/install-sysroot.sh +++ b/build/linux/alpine_sysroot_scripts/install-sysroot.sh @@ -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"