fix: sysroot used for client (#204559)

pull/204566/head
Robo 2024-02-07 13:50:23 +09:00 committed by GitHub
parent 95386afadd
commit 9db1b0571e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 6 deletions

View File

@ -42,6 +42,7 @@ steps:
- script: |
set -e
if [ -n "$SYSROOT_ARCH" ]; then
export VSCODE_SYSROOT_PREFIX='-glibc-2.17'
export VSCODE_SYSROOT_DIR=$(Build.SourcesDirectory)/.build/sysroots
node -e '(async () => { const { getVSCodeSysroot } = require("../build/linux/debian/install-sysroot.js"); await getVSCodeSysroot(process.env["SYSROOT_ARCH"]); })()'
if [ "$SYSROOT_ARCH" == "arm64" ]; then

View File

@ -119,17 +119,18 @@ async function fetchUrl(options, retries = 10, retryDelay = 1000) {
async function getVSCodeSysroot(arch) {
let expectedName;
let triple;
const prefix = process.env['VSCODE_SYSROOT_PREFIX'] ?? '-glibc-2.28';
switch (arch) {
case 'amd64':
expectedName = `x86_64-linux-gnu-glibc-2.17.tar.gz`;
expectedName = `x86_64-linux-gnu${prefix}.tar.gz`;
triple = 'x86_64-linux-gnu';
break;
case 'arm64':
expectedName = `aarch64-linux-gnu-glibc-2.17.tar.gz`;
expectedName = `aarch64-linux-gnu${prefix}.tar.gz`;
triple = 'aarch64-linux-gnu';
break;
case 'armhf':
expectedName = `arm-rpi-linux-gnueabihf-glibc-2.17.tar.gz`;
expectedName = `arm-rpi-linux-gnueabihf${prefix}.tar.gz`;
triple = 'arm-rpi-linux-gnueabihf';
break;
}

View File

@ -137,17 +137,18 @@ type SysrootDictEntry = {
export async function getVSCodeSysroot(arch: DebianArchString): Promise<string> {
let expectedName: string;
let triple: string;
const prefix = process.env['VSCODE_SYSROOT_PREFIX'] ?? '-glibc-2.28';
switch (arch) {
case 'amd64':
expectedName = `x86_64-linux-gnu-glibc-2.17.tar.gz`;
expectedName = `x86_64-linux-gnu${prefix}.tar.gz`;
triple = 'x86_64-linux-gnu';
break;
case 'arm64':
expectedName = `aarch64-linux-gnu-glibc-2.17.tar.gz`;
expectedName = `aarch64-linux-gnu${prefix}.tar.gz`;
triple = 'aarch64-linux-gnu';
break;
case 'armhf':
expectedName = `arm-rpi-linux-gnueabihf-glibc-2.17.tar.gz`;
expectedName = `arm-rpi-linux-gnueabihf${prefix}.tar.gz`;
triple = 'arm-rpi-linux-gnueabihf';
break;
}