Merge branch 'master' into insider

This commit is contained in:
Baptiste Augrain 2024-11-05 16:54:21 +01:00
commit 29779adedd
17 changed files with 786 additions and 325 deletions

View File

@ -276,6 +276,9 @@ jobs:
- slug: RISCV64
vscode_arch: riscv64
npm_arch: riscv64
- slug: LOONG64
vscode_arch: loong64
npm_arch: loong64
env:
BUILD_SOURCEVERSION: ${{ needs.compile.outputs.BUILD_SOURCEVERSION }}
DISABLED: ${{ vars[format('DISABLE_INSIDER_LINUX_REH_{0}', matrix.slug)] }}

View File

@ -274,6 +274,9 @@ jobs:
- slug: RISCV64
vscode_arch: riscv64
npm_arch: riscv64
- slug: LOONG64
vscode_arch: loong64
npm_arch: loong64
env:
BUILD_SOURCEVERSION: ${{ needs.compile.outputs.BUILD_SOURCEVERSION }}
DISABLED: ${{ vars[format('DISABLE_STABLE_LINUX_REH_{0}', matrix.slug)] }}

View File

@ -59,6 +59,8 @@ elif [[ "${UNAME_ARCH}" == "ppc64le" ]]; then
export VSCODE_ARCH="ppc64le"
elif [[ "${UNAME_ARCH}" == "riscv64" ]]; then
export VSCODE_ARCH="riscv64"
elif [[ "${UNAME_ARCH}" == "loongarch64" ]]; then
export VSCODE_ARCH="loong64"
else
export VSCODE_ARCH="x64"
fi

View File

@ -426,6 +426,32 @@ elif [[ "${ASSETS}" != "null" ]]; then
fi
fi
# linux-loong64
if [[ "${VSCODE_ARCH}" == "loong64" || "${CHECK_ALL}" == "yes" ]]; then
export SHOULD_BUILD_DEB="no"
export SHOULD_BUILD_RPM="no"
export SHOULD_BUILD_APPIMAGE="no"
export SHOULD_BUILD_TAR="no"
if [[ -z $( contains "${APP_NAME_LC}-reh-linux-loong64-${RELEASE_VERSION}.tar.gz" ) ]]; then
echo "Building on Linux Loong64 because we have no REH archive"
export SHOULD_BUILD="yes"
else
export SHOULD_BUILD_REH="no"
fi
if [[ -z $( contains "${APP_NAME_LC}-reh-web-linux-loong64-${RELEASE_VERSION}.tar.gz" ) ]]; then
echo "Building on Linux Loong64 because we have no REH-web archive"
export SHOULD_BUILD="yes"
else
export SHOULD_BUILD_REH_WEB="no"
fi
if [[ "${SHOULD_BUILD}" != "yes" ]]; then
echo "Already have all the Linux Loong64 builds"
fi
fi
# linux-x64
if [[ "${VSCODE_ARCH}" == "x64" || "${CHECK_ALL}" == "yes" ]]; then
if [[ -z $( contains "amd64.deb" ) ]]; then
@ -544,6 +570,10 @@ else
elif [[ "${VSCODE_ARCH}" == "riscv64" ]]; then
SHOULD_BUILD_DEB="no"
SHOULD_BUILD_RPM="no"
elif [[ "${VSCODE_ARCH}" == "loong64" ]]; then
SHOULD_BUILD_DEB="no"
SHOULD_BUILD_RPM="no"
SHOULD_BUILD_TAR="no"
fi
if [[ "${VSCODE_ARCH}" != "x64" || "${DISABLE_APPIMAGE}" == "yes" ]]; then
export SHOULD_BUILD_APPIMAGE="no"

View File

@ -27,9 +27,9 @@
Even though we do not pass the telemetry build flags (and go out of our way to cripple the baked-in telemetry), Microsoft will still track usage by default.
We do however set the default `telemetry.enableCrashReporter` and `telemetry.enableTelemetry` values to false. You can see those by viewing your VSCodium settings.json and searching for `telemetry`.
We do however set the `telemetry.enableTelemetry` setting's default value to `false`. You can see those by viewing your VSCodium `settings.json` and searching for `telemetry`.
The instructions [here](https://code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting) and [here](https://code.visualstudio.com/docs/supporting/faq#_how-to-disable-crash-reporting) help with explaining and toggling telemetry.
The instructions [here](https://code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting) help with explaining and toggling telemetry.
It is also highly recommended that you review all the settings that "use online services" by following [these instructions](https://code.visualstudio.com/docs/getstarted/telemetry#_managing-online-services). The `@tag:usesOnlineServices` filter on the settings page will show that by default:

View File

@ -4,6 +4,7 @@
- [Linux](#linux)
- [Fonts showing up as rectangles](#linux-fonts-rectangle)
- [Text and/or the entire interface not appearing](#linux-rendering-glitches)
- [Global menu workaround for KDE](#linux-kde-global-menu)
- [Flatpak most common issues](#linux-flatpak-most-common-issues)
- [Remote SSH doesn't work](#linux-remote-ssh)
@ -24,6 +25,14 @@ rm -rf ~/snap/codium/common/.cache
fc-cache -r
```
#### <a id="linux-rendering-glitches"></a>*Text and/or the entire interface not appearing*
You have likely encountered [a bug in Chromium and Electron](microsoft/vscode#190437) when compiling Mesa shaders, which has affected all Visual Studio Code and VSCodium versions for Linux distributions since 1.82. The current workaround (see microsoft/vscode#190437) is to delete the GPU cache as follows:
```bash
rm -rf ~/.config/VSCodium/GPUCache
```
#### <a id="linux-kde-global-menu"></a>*Global menu workaround for KDE*
Install these packages on Fedora:

View File

@ -16,23 +16,29 @@ cd vscode || { echo "'vscode' dir not found"; exit 1; }
export VSCODE_SKIP_NODE_VERSION_CHECK=1
export VSCODE_SYSROOT_PREFIX='-glibc-2.17'
if [[ "${VSCODE_ARCH}" == "ppc64le" ]]; then
export VSCODE_SYSROOT_REPO='VSCodium/vscode-linux-build-agent'
if [[ "${VSCODE_ARCH}" == "arm64" || "${VSCODE_ARCH}" == "armhf" ]]; then
export VSCODE_SKIP_SYSROOT=1
export USE_GNUPP2A=1
elif [[ "${VSCODE_ARCH}" == "ppc64le" ]]; then
export VSCODE_SYSROOT_REPOSITORY='VSCodium/vscode-linux-build-agent'
export VSCODE_SYSROOT_VERSION='20240129-253798'
export VSCODE_SYSROOT_PREFIX='-glibc-2.28'
fi
if [[ "${VSCODE_ARCH}" == "riscv64" ]]; then
export VSCODE_ELECTRON_REPO='riscv-forks/electron-riscv-releases'
export USE_GNUPP2A=1
elif [[ "${VSCODE_ARCH}" == "riscv64" ]]; then
export VSCODE_ELECTRON_REPOSITORY='riscv-forks/electron-riscv-releases'
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
export VSCODE_SKIP_SETUPENV=1
fi
source ../electron.riscv64.sh
if [[ -f "../electron_linux_${VSCODE_ARCH}.sh" ]]; then
# shellcheck disable=SC1090
source "../electron_linux_${VSCODE_ARCH}.sh"
if [[ "${ELECTRON_VERSION}" != "$(yarn config get target)" ]]; then
if [[ "${ELECTRON_VERSION}" != "$( yarn config get target )" ]]; then
# Fail the pipeline if electron target doesn't match what is used.
echo "Electron RISC-V binary version doesn't match target electron version!"
echo "Releases available at: https://github.com/${VSCODE_ELECTRON_REPO}/releases"
echo "Electron ${VSCODE_ARCH} binary version doesn't match target electron version!"
echo "Releases available at: https://github.com/${VSCODE_ELECTRON_REPOSITORY}/releases"
exit 1
fi
fi
@ -49,6 +55,28 @@ if [[ -d "../patches/linux/client/" ]]; then
done
fi
if [[ -n "${USE_GNUPP2A}" ]]; then
INCLUDES=$(cat <<EOF
{
"target_defaults": {
"conditions": [
["OS=='linux'", {
'cflags_cc!': [ '-std=gnu++20' ],
'cflags_cc': [ '-std=gnu++2a' ],
}]
]
}
}
EOF
)
if [ ! -d "$HOME/.gyp" ]; then
mkdir -p "$HOME/.gyp"
fi
echo "${INCLUDES}" > "$HOME/.gyp/include.gypi"
fi
for i in {1..5}; do # try 5 times
npm ci --prefix build && break
if [[ $i == 3 ]]; then
@ -58,10 +86,12 @@ for i in {1..5}; do # try 5 times
echo "Npm install failed $i, trying again..."
done
if [[ "${VSCODE_ARCH}" == "ppc64le" ]]; then
source ./build/azure-pipelines/linux/setup-env.sh
else
./build/azure-pipelines/linux/setup-env.sh
if [[ -z "${VSCODE_SKIP_SETUPENV}" ]]; then
if [[ -n "${VSCODE_SKIP_SYSROOT}" ]]; then
source ./build/azure-pipelines/linux/setup-env.sh --skip-sysroot
else
source ./build/azure-pipelines/linux/setup-env.sh
fi
fi
for i in {1..5}; do # try 5 times

View File

@ -19,12 +19,48 @@ GLIBC_VERSION="2.17"
GLIBCXX_VERSION="3.4.22"
NODE_VERSION="16.20.2"
if [[ "${VSCODE_ARCH}" == "ppc64le" ]]; then
if [[ "${VSCODE_ARCH}" == "x64" ]]; then
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME="vscodium/vscodium-linux-build-agent:centos7-devtoolset8-${VSCODE_ARCH}"
elif [[ "${VSCODE_ARCH}" == "arm64" ]]; then
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME="vscodium/vscodium-linux-build-agent:centos7-devtoolset8-${VSCODE_ARCH}"
export VSCODE_SKIP_SYSROOT=1
export USE_GNUPP2A=1
elif [[ "${VSCODE_ARCH}" == "armhf" ]]; then
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME="vscodium/vscodium-linux-build-agent:bionic-devtoolset-arm32v7"
export VSCODE_SKIP_SYSROOT=1
export USE_GNUPP2A=1
elif [[ "${VSCODE_ARCH}" == "ppc64le" ]]; then
GLIBC_VERSION="2.28"
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME="vscodium/vscodium-linux-build-agent:bionic-devtoolset-ppc64le"
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
export VSCODE_SYSROOT_REPOSITORY='VSCodium/vscode-linux-build-agent'
export VSCODE_SYSROOT_VERSION='20240129-253798'
export USE_GNUPP2A=1
elif [[ "${VSCODE_ARCH}" == "riscv64" ]]; then
# Unofficial RISC-V nodejs builds doesn't provide v16.x
# Node 18 is buggy so use 20 here for now: https://github.com/VSCodium/vscodium/issues/2060
NODE_VERSION="20.16.0"
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME="vscodium/vscodium-linux-build-agent:focal-devtoolset-riscv64"
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
export VSCODE_SKIP_SETUPENV=1
export VSCODE_NODEJS_SITE='https://unofficial-builds.nodejs.org'
# part of the url before '/v${nodeVersion}/node-v${nodeVersion}-${platform}-${arch}.tar.gz'
export VSCODE_NODEJS_URLROOT='/download/release'
elif [[ "${VSCODE_ARCH}" == "loong64" ]]; then
NODE_VERSION="20.16.0"
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME="vscodium/vscodium-linux-build-agent:trixie-devtoolset-loong64"
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
export VSCODE_SKIP_SETUPENV=1
export VSCODE_NODEJS_SITE='https://unofficial-builds.nodejs.org'
export VSCODE_NODEJS_URLROOT='/download/release'
fi
export VSCODE_PLATFORM='linux'
@ -34,23 +70,6 @@ export VSCODE_SYSROOT_PREFIX="-glibc-${GLIBC_VERSION}"
VSCODE_HOST_MOUNT="$( pwd )"
export VSCODE_HOST_MOUNT
if [[ "${VSCODE_ARCH}" == "x64" || "${VSCODE_ARCH}" == "arm64" ]]; then
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME="vscodium/vscodium-linux-build-agent:centos7-devtoolset8-${VSCODE_ARCH}"
elif [[ "${VSCODE_ARCH}" == "armhf" ]]; then
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME="vscodium/vscodium-linux-build-agent:bionic-devtoolset-arm32v7"
elif [[ "${VSCODE_ARCH}" == "ppc64le" ]]; then
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME="vscodium/vscodium-linux-build-agent:bionic-devtoolset-ppc64le"
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
export VSCODE_SYSROOT_REPO='VSCodium/vscode-linux-build-agent'
export VSCODE_SYSROOT_VERSION='20240129-253798'
elif [[ "${VSCODE_ARCH}" == "riscv64" ]]; then
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME="vscodium/vscodium-linux-build-agent:focal-devtoolset-riscv64"
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
fi
export VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME
sed -i "/target/s/\"20.*\"/\"${NODE_VERSION}\"/" remote/.npmrc
@ -73,7 +92,7 @@ if [[ -d "../patches/linux/reh/" ]]; then
done
fi
if [[ "${VSCODE_ARCH}" == "ppc64le" ]]; then
if [[ -n "${USE_GNUPP2A}" ]]; then
INCLUDES=$(cat <<EOF
{
"target_defaults": {
@ -104,10 +123,12 @@ for i in {1..5}; do # try 5 times
echo "Npm install failed $i, trying again..."
done
if [[ "${VSCODE_ARCH}" == "ppc64le" ]]; then
source ./build/azure-pipelines/linux/setup-env.sh
else
./build/azure-pipelines/linux/setup-env.sh --only-remote
if [[ -z "${VSCODE_SKIP_SETUPENV}" ]]; then
if [[ -n "${VSCODE_SKIP_SYSROOT}" ]]; then
source ./build/azure-pipelines/linux/setup-env.sh --skip-sysroot
else
source ./build/azure-pipelines/linux/setup-env.sh
fi
fi
for i in {1..5}; do # try 5 times
@ -130,9 +151,15 @@ if [[ "${SHOULD_BUILD_REH}" != "no" ]]; then
EXPECTED_GLIBC_VERSION="${GLIBC_VERSION}" EXPECTED_GLIBCXX_VERSION="${GLIBCXX_VERSION}" SEARCH_PATH="../vscode-reh-${VSCODE_PLATFORM}-${VSCODE_ARCH}" ./build/azure-pipelines/linux/verify-glibc-requirements.sh
echo "Archiving REH"
pushd "../vscode-reh-${VSCODE_PLATFORM}-${VSCODE_ARCH}"
if [[ -f "../ripgrep_${VSCODE_PLATFORM}_${VSCODE_ARCH}.sh" ]]; then
exec "../ripgrep_${VSCODE_PLATFORM}_${VSCODE_ARCH}.sh"
fi
echo "Archiving REH"
tar czf "../assets/${APP_NAME_LC}-reh-${VSCODE_PLATFORM}-${VSCODE_ARCH}-${RELEASE_VERSION}.tar.gz" .
popd
fi
@ -143,9 +170,15 @@ if [[ "${SHOULD_BUILD_REH_WEB}" != "no" ]]; then
EXPECTED_GLIBC_VERSION="${GLIBC_VERSION}" EXPECTED_GLIBCXX_VERSION="${GLIBCXX_VERSION}" SEARCH_PATH="../vscode-reh-web-${VSCODE_PLATFORM}-${VSCODE_ARCH}" ./build/azure-pipelines/linux/verify-glibc-requirements.sh
echo "Archiving REH-web"
pushd "../vscode-reh-web-${VSCODE_PLATFORM}-${VSCODE_ARCH}"
if [[ -f "../ripgrep_${VSCODE_PLATFORM}_${VSCODE_ARCH}.sh" ]]; then
exec "../ripgrep_${VSCODE_PLATFORM}_${VSCODE_ARCH}.sh"
fi
echo "Archiving REH-web"
tar czf "../assets/${APP_NAME_LC}-reh-web-${VSCODE_PLATFORM}-${VSCODE_ARCH}-${RELEASE_VERSION}.tar.gz" .
popd
fi

View File

@ -1,28 +1,51 @@
#!/usr/bin/env bash
set -e
echo "$#"
cd vscode || { echo "'vscode' dir not found"; exit 1; }
git add .
git reset -q --hard HEAD
while [[ -n "$( git log -1 | grep "VSCODIUM HELPER" )" ]]; do
git reset -q --hard HEAD~
done
git apply --reject "../patches/helper/settings.patch"
while [ $# -gt 1 ]; do
echo "Parameter: $1"
if [[ "${1}" == *patch ]]; then
FILE="../patches/${1}"
else
FILE="../patches/${1}.patch"
fi
git apply --reject "${FILE}"
shift
done
git add .
git commit -q -m "VSCODIUM HELPER" --no-verify
if [[ "${1}" == *patch ]]; then
FILE="../patches/${1}"
else
FILE="../patches/${1}.patch"
fi
cd vscode || { echo "'vscode' dir not found"; exit 1; }
git add .
git reset -q --hard HEAD
if [[ -f "${FILE}" ]]; then
git apply --reject "${FILE}"
fi
git apply --reject "../patches/helper/settings.patch"
read -rp "Press any key when the conflict have been resolved..." -n1 -s
git restore .vscode/settings.json
git add .
git diff --staged -U1 > "${FILE}"
git reset -q --hard HEAD~
cd ..

View File

@ -1,14 +0,0 @@
diff --git a/src/main.ts b/src/main.ts
index ff9a5e8..6fb7fd2 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -467,6 +467,9 @@ function configureCrashReporter(): void {
}
}
}
+ else {
+ return;
+ }
}
// Start crash reporter for all processes

View File

@ -0,0 +1,116 @@
diff --git a/build/azure-pipelines/linux/setup-env.sh b/build/azure-pipelines/linux/setup-env.sh
index d836fb7..fbe67b0 100755
--- a/build/azure-pipelines/linux/setup-env.sh
+++ b/build/azure-pipelines/linux/setup-env.sh
@@ -2,3 +2,3 @@
-set -e
+set -ex
diff --git a/build/gulpfile.reh.js b/build/gulpfile.reh.js
index 53ef6f3..d0770d6 100644
--- a/build/gulpfile.reh.js
+++ b/build/gulpfile.reh.js
@@ -229,9 +229,23 @@ function nodejs(platform, arch) {
case 'linux':
- return (product.nodejsRepository !== 'https://nodejs.org' ?
- fetchGithub(product.nodejsRepository, { version: `${nodeVersion}-${internalNodeVersion}`, name: expectedName, checksumSha256 }) :
- fetchUrls(`/dist/v${nodeVersion}/node-v${nodeVersion}-${platform}-${arch}.tar.gz`, { base: 'https://nodejs.org', checksumSha256 })
- ).pipe(flatmap(stream => stream.pipe(gunzip()).pipe(untar())))
- .pipe(filter('**/node'))
- .pipe(util.setExecutableBit('**'))
- .pipe(rename('node'));
+ if (process.env.VSCODE_NODEJS_SITE && process.env.VSCODE_NODEJS_URLROOT) {
+ return fetchUrls(`${process.env.VSCODE_NODEJS_URLROOT}/v${nodeVersion}/node-v${nodeVersion}-${platform}-${arch}.tar.gz`, { base: process.env.VSCODE_NODEJS_SITE, checksumSha256 })
+ .pipe(flatmap(stream => stream.pipe(gunzip()).pipe(untar())))
+ .pipe(filter('**/node'))
+ .pipe(util.setExecutableBit('**'))
+ .pipe(rename('node'));
+ }
+ if (product.nodejsRepository !== 'https://nodejs.org') {
+ return fetchGithub(product.nodejsRepository, { version: `${nodeVersion}-${internalNodeVersion}`, name: expectedName, checksumSha256 })
+ .pipe(flatmap(stream => stream.pipe(gunzip()).pipe(untar())))
+ .pipe(filter('**/node'))
+ .pipe(util.setExecutableBit('**'))
+ .pipe(rename('node'));
+ }
+ else {
+ return fetchUrls(`/dist/v${nodeVersion}/node-v${nodeVersion}-${platform}-${arch}.tar.gz`, { base: 'https://nodejs.org', checksumSha256 })
+ .pipe(flatmap(stream => stream.pipe(gunzip()).pipe(untar())))
+ .pipe(filter('**/node'))
+ .pipe(util.setExecutableBit('**'))
+ .pipe(rename('node'));
+ }
case 'alpine':
diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js
index da753e9..95f2cf0 100644
--- a/build/gulpfile.vscode.js
+++ b/build/gulpfile.vscode.js
@@ -385,2 +385,12 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
+ const electronOverride = {};
+ if (process.env.VSCODE_ELECTRON_REPOSITORY) {
+ // official electron doesn't support all arch, override the repo with `VSCODE_ELECTRON_REPOSITORY`.
+ electronOverride.repo = process.env.VSCODE_ELECTRON_REPOSITORY;
+ }
+
+ if (process.env.VSCODE_ELECTRON_TAG) {
+ electronOverride.tag = process.env.VSCODE_ELECTRON_TAG;
+ }
+
let result = all
@@ -389,3 +399,3 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
.pipe(filter(['**', '!**/.github/**'], { dot: true })) // https://github.com/microsoft/vscode/issues/116523
- .pipe(electron({ ...config, platform, arch: arch === 'armhf' ? 'arm' : arch, ffmpegChromium: false }))
+ .pipe(electron({ ...config, ...electronOverride, platform, arch: arch === 'armhf' ? 'arm' : arch, ffmpegChromium: false }))
.pipe(filter(['**', '!LICENSE', '!version'], { dot: true }));
diff --git a/build/linux/debian/dep-lists.js b/build/linux/debian/dep-lists.js
index 3bb58fb..306d91e 100644
--- a/build/linux/debian/dep-lists.js
+++ b/build/linux/debian/dep-lists.js
@@ -138,3 +138,3 @@ exports.referenceGeneratedDepsByArch = {
'xdg-utils (>= 1.0.2)'
- ]
+ ],
};
diff --git a/build/linux/debian/dep-lists.ts b/build/linux/debian/dep-lists.ts
index e3d78d1..9f29943 100644
--- a/build/linux/debian/dep-lists.ts
+++ b/build/linux/debian/dep-lists.ts
@@ -138,3 +138,3 @@ export const referenceGeneratedDepsByArch = {
'xdg-utils (>= 1.0.2)'
- ]
+ ],
};
diff --git a/build/linux/debian/install-sysroot.js b/build/linux/debian/install-sysroot.js
index 354c67a..2cd8f2d 100644
--- a/build/linux/debian/install-sysroot.js
+++ b/build/linux/debian/install-sysroot.js
@@ -71,3 +71,5 @@ async function fetchUrl(options, retries = 10, retryDelay = 1000) {
try {
- const response = await fetch(`https://api.github.com/repos/Microsoft/vscode-linux-build-agent/releases/tags/v${version}`, {
+ const repository = process.env['VSCODE_SYSROOT_REPOSITORY'] ?? 'Microsoft/vscode-linux-build-agent';
+ const actualVersion = process.env['VSCODE_SYSROOT_VERSION'] ?? version;
+ const response = await fetch(`https://api.github.com/repos/${repository}/releases/tags/v${actualVersion}`, {
headers: ghApiHeaders,
@@ -80,3 +82,3 @@ async function fetchUrl(options, retries = 10, retryDelay = 1000) {
if (!asset) {
- throw new Error(`Could not find asset in release of Microsoft/vscode-linux-build-agent @ ${version}`);
+ throw new Error(`Could not find asset in release of ${repository} @ ${actualVersion}`);
}
diff --git a/build/linux/debian/install-sysroot.ts b/build/linux/debian/install-sysroot.ts
index 8ea43a5..d8de38e 100644
--- a/build/linux/debian/install-sysroot.ts
+++ b/build/linux/debian/install-sysroot.ts
@@ -83,3 +83,5 @@ async function fetchUrl(options: IFetchOptions, retries = 10, retryDelay = 1000)
try {
- const response = await fetch(`https://api.github.com/repos/Microsoft/vscode-linux-build-agent/releases/tags/v${version}`, {
+ const repository = process.env['VSCODE_SYSROOT_REPOSITORY'] ?? 'Microsoft/vscode-linux-build-agent';
+ const actualVersion = process.env['VSCODE_SYSROOT_VERSION'] ?? version;
+ const response = await fetch(`https://api.github.com/repos/${repository}/releases/tags/v${actualVersion}`, {
headers: ghApiHeaders,
@@ -92,3 +94,3 @@ async function fetchUrl(options: IFetchOptions, retries = 10, retryDelay = 1000)
if (!asset) {
- throw new Error(`Could not find asset in release of Microsoft/vscode-linux-build-agent @ ${version}`);
+ throw new Error(`Could not find asset in release of ${repository} @ ${actualVersion}`);
}

View File

@ -1,33 +1,24 @@
diff --git a/build/azure-pipelines/linux/setup-env.sh b/build/azure-pipelines/linux/setup-env.sh
index 949b5f3..30093d6 100755
index fbe67b0..5b2f5d8 100755
--- a/build/azure-pipelines/linux/setup-env.sh
+++ b/build/azure-pipelines/linux/setup-env.sh
@@ -9,2 +9,6 @@ fi
+if [ "$npm_config_arch" == "riscv64" ]; then
+ exit 0
+fi
+
export VSCODE_SYSROOT_DIR=$PWD/.build/sysroots
@@ -67,2 +71,16 @@ elif [ "$npm_config_arch" == "arm" ]; then
@@ -74,2 +74,14 @@ elif [ "$npm_config_arch" == "arm" ]; then
export VSCODE_REMOTE_LDFLAGS="--sysroot=$VSCODE_SYSROOT_DIR/arm-rpi-linux-gnueabihf/arm-rpi-linux-gnueabihf/sysroot -L$VSCODE_SYSROOT_DIR/arm-rpi-linux-gnueabihf/arm-rpi-linux-gnueabihf/sysroot/usr/lib/arm-linux-gnueabihf -L$VSCODE_SYSROOT_DIR/arm-rpi-linux-gnueabihf/arm-rpi-linux-gnueabihf/sysroot/lib/arm-linux-gnueabihf"
+elif [ "$npm_config_arch" == "ppc64" ]; then
+ if [ "$(echo "$@" | grep -c -- "--only-remote")" -eq 0 ]; then
+ # Set compiler toolchain for client native modules
+ export CC=$VSCODE_SYSROOT_DIR/powerpc64le-linux-gnu/bin/powerpc64le-linux-gnu-gcc
+ export CXX=$VSCODE_SYSROOT_DIR/powerpc64le-linux-gnu/bin/powerpc64le-linux-gnu-g++
+ export CXXFLAGS="--sysroot=$VSCODE_SYSROOT_DIR/powerpc64le-linux-gnu/powerpc64le-linux-gnu/sysroot"
+ export LDFLAGS="--sysroot=$VSCODE_SYSROOT_DIR/powerpc64le-linux-gnu/powerpc64le-linux-gnu/sysroot -L$VSCODE_SYSROOT_DIR/powerpc64le-linux-gnu/powerpc64le-linux-gnu/sysroot/usr/lib/powerpc64le-linux-gnu -L$VSCODE_SYSROOT_DIR/powerpc64le-linux-gnu/powerpc64le-linux-gnu/sysroot/lib/powerpc64le-linux-gnu"
+ # Set compiler toolchain for client native modules
+ export CC=$VSCODE_SYSROOT_DIR/powerpc64le-linux-gnu/bin/powerpc64le-linux-gnu-gcc
+ export CXX=$VSCODE_SYSROOT_DIR/powerpc64le-linux-gnu/bin/powerpc64le-linux-gnu-g++
+ export CXXFLAGS="--sysroot=$VSCODE_SYSROOT_DIR/powerpc64le-linux-gnu/powerpc64le-linux-gnu/sysroot"
+ export LDFLAGS="--sysroot=$VSCODE_SYSROOT_DIR/powerpc64le-linux-gnu/powerpc64le-linux-gnu/sysroot -L$VSCODE_SYSROOT_DIR/powerpc64le-linux-gnu/powerpc64le-linux-gnu/sysroot/usr/lib/powerpc64le-linux-gnu -L$VSCODE_SYSROOT_DIR/powerpc64le-linux-gnu/powerpc64le-linux-gnu/sysroot/lib/powerpc64le-linux-gnu"
+
+ # Set compiler toolchain for remote server
+ export VSCODE_REMOTE_CC=$VSCODE_SYSROOT_DIR/powerpc64le-linux-gnu/bin/powerpc64le-linux-gnu-gcc
+ export VSCODE_REMOTE_CXX=$VSCODE_SYSROOT_DIR/powerpc64le-linux-gnu/bin/powerpc64le-linux-gnu-g++
+ export VSCODE_REMOTE_CXXFLAGS="--sysroot=$VSCODE_SYSROOT_DIR/powerpc64le-linux-gnu/powerpc64le-linux-gnu/sysroot"
+ export VSCODE_REMOTE_LDFLAGS="--sysroot=$VSCODE_SYSROOT_DIR/powerpc64le-linux-gnu/powerpc64le-linux-gnu/sysroot -L$VSCODE_SYSROOT_DIR/powerpc64le-linux-gnu/powerpc64le-linux-gnu/sysroot/usr/lib/powerpc64le-linux-gnu -L$VSCODE_SYSROOT_DIR/powerpc64le-linux-gnu/powerpc64le-linux-gnu/sysroot/lib/powerpc64le-linux-gnu"
+ fi
+ # Set compiler toolchain for remote server
+ export VSCODE_REMOTE_CC=$VSCODE_SYSROOT_DIR/powerpc64le-linux-gnu/bin/powerpc64le-linux-gnu-gcc
+ export VSCODE_REMOTE_CXX=$VSCODE_SYSROOT_DIR/powerpc64le-linux-gnu/bin/powerpc64le-linux-gnu-g++
+ export VSCODE_REMOTE_CXXFLAGS="--sysroot=$VSCODE_SYSROOT_DIR/powerpc64le-linux-gnu/powerpc64le-linux-gnu/sysroot"
+ export VSCODE_REMOTE_LDFLAGS="--sysroot=$VSCODE_SYSROOT_DIR/powerpc64le-linux-gnu/powerpc64le-linux-gnu/sysroot -L$VSCODE_SYSROOT_DIR/powerpc64le-linux-gnu/powerpc64le-linux-gnu/sysroot/usr/lib/powerpc64le-linux-gnu -L$VSCODE_SYSROOT_DIR/powerpc64le-linux-gnu/powerpc64le-linux-gnu/sysroot/lib/powerpc64le-linux-gnu"
fi
diff --git a/build/azure-pipelines/linux/verify-glibc-requirements.sh b/build/azure-pipelines/linux/verify-glibc-requirements.sh
index 19482c2..f49d910 100755
index c655ce7..c7150f2 100755
--- a/build/azure-pipelines/linux/verify-glibc-requirements.sh
+++ b/build/azure-pipelines/linux/verify-glibc-requirements.sh
@@ -9,2 +9,4 @@ elif [ "$VSCODE_ARCH" == "armhf" ]; then
@ -43,119 +34,76 @@ index 0b5f38c..9f3b02b 100644
dbb927408393041664a020661f2641c9785741be3d29b050b9dac58980967784 x86_64-linux-gnu-glibc-2.28.tar.gz
+fa8176d27be18bb0eeb7f55b0fa22255050b430ef68c29136599f02976eb0b1b powerpc64le-linux-gnu-glibc-2.28.tar.gz
diff --git a/build/gulpfile.reh.js b/build/gulpfile.reh.js
index 7d58861..f14984f 100644
index d0770d6..8c83c13 100644
--- a/build/gulpfile.reh.js
+++ b/build/gulpfile.reh.js
@@ -48,2 +48,4 @@ const BUILD_TARGETS = [
@@ -50,2 +50,3 @@ const BUILD_TARGETS = [
{ platform: 'linux', arch: 'arm64' },
+ { platform: 'linux', arch: 'ppc64le' },
+ { platform: 'linux', arch: 'riscv64' },
{ platform: 'alpine', arch: 'arm64' },
@@ -217,2 +219,10 @@ function nodejs(platform, arch) {
case 'linux':
+ if (arch === 'riscv64') {
+ return fetchUrls(`/download/release/v${nodeVersion}/node-v${nodeVersion}-${platform}-${arch}.tar.gz`,
+ { base: 'https://unofficial-builds.nodejs.org', checksumSha256 }).pipe(flatmap(stream => stream.pipe(gunzip()).pipe
+ (untar())))
+ .pipe(filter('**/node'))
+ .pipe(util.setExecutableBit('**'))
+ .pipe(rename('node'));
+ }
return (product.nodejsRepository !== 'https://nodejs.org' ?
diff --git a/build/gulpfile.scan.js b/build/gulpfile.scan.js
index 6f8144b..8a8195e 100644
index cbcdddb..274d889 100644
--- a/build/gulpfile.scan.js
+++ b/build/gulpfile.scan.js
@@ -26,2 +26,4 @@ const BUILD_TARGETS = [
@@ -26,2 +26,3 @@ const BUILD_TARGETS = [
{ platform: 'linux', arch: 'arm64' },
+ { platform: 'linux', arch: 'ppc64le' },
+ { platform: 'linux', arch: 'riscv64' },
];
diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js
index 4af4067..1f99344 100644
index 95f2cf0..7395ba4 100644
--- a/build/gulpfile.vscode.js
+++ b/build/gulpfile.vscode.js
@@ -350,2 +350,12 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
+ const electronOverride = {};
+ if (process.env.VSCODE_ELECTRON_REPO) {
+ // electron doesn't support riscv64 and ppc64le, override the repo with `VSCODE_ELECTRON_REPO`.
+ electronOverride.repo = process.env.VSCODE_ELECTRON_REPO;
+ }
+
+ if (process.env.VSCODE_ELECTRON_TAG) {
+ electronOverride.tag = process.env.VSCODE_ELECTRON_TAG;
+ }
+
let result = all
@@ -354,3 +364,3 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
.pipe(filter(['**', '!**/.github/**'], { dot: true })) // https://github.com/microsoft/vscode/issues/116523
- .pipe(electron({ ...config, platform, arch: arch === 'armhf' ? 'arm' : arch, ffmpegChromium: false }))
+ .pipe(electron({ ...config, ...electronOverride, platform, arch: arch === 'armhf' ? 'arm' : arch, ffmpegChromium: false }))
.pipe(filter(['**', '!LICENSE', '!version'], { dot: true }));
@@ -449,2 +459,4 @@ const BUILD_TARGETS = [
@@ -494,2 +494,3 @@ const BUILD_TARGETS = [
{ platform: 'linux', arch: 'arm64' },
+ { platform: 'linux', arch: 'ppc64le' },
+ { platform: 'linux', arch: 'riscv64' },
];
diff --git a/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js
index 28ddfb0..cb3169c 100644
index fb0e5a4..264cec1 100644
--- a/build/gulpfile.vscode.linux.js
+++ b/build/gulpfile.vscode.linux.js
@@ -33,3 +33,3 @@ const linuxPackageRevision = Math.floor(new Date().getTime() / 1000);
function getDebPackageArch(arch) {
- return { x64: 'amd64', armhf: 'armhf', arm64: 'arm64' }[arch];
+ return { x64: 'amd64', armhf: 'armhf', arm64: 'arm64', ppc64le: 'ppc64el', riscv64: 'riscv64' }[arch];
+ return { x64: 'amd64', armhf: 'armhf', arm64: 'arm64', ppc64le: 'ppc64el' }[arch];
}
@@ -141,3 +141,3 @@ function getRpmBuildPath(rpmArch) {
@@ -145,3 +145,3 @@ function getRpmBuildPath(rpmArch) {
function getRpmPackageArch(arch) {
- return { x64: 'x86_64', armhf: 'armv7hl', arm64: 'aarch64' }[arch];
+ return { x64: 'x86_64', armhf: 'armv7hl', arm64: 'aarch64', ppc64le: 'ppc64le', riscv64: 'riscv64' }[arch];
+ return { x64: 'x86_64', armhf: 'armv7hl', arm64: 'aarch64', ppc64le: 'ppc64le' }[arch];
}
@@ -301,2 +301,4 @@ const BUILD_TARGETS = [
@@ -307,2 +307,3 @@ const BUILD_TARGETS = [
{ arch: 'arm64' },
+ { arch: 'ppc64le' },
+ { arch: 'riscv64' },
];
diff --git a/build/linux/debian/calculate-deps.js b/build/linux/debian/calculate-deps.js
index bbcb6bf..d00158f 100644
index 57934e6..b97d275 100644
--- a/build/linux/debian/calculate-deps.js
+++ b/build/linux/debian/calculate-deps.js
@@ -51,2 +51,8 @@ function calculatePackageDeps(binaryPath, arch, chromiumSysroot, vscodeSysroot)
@@ -51,2 +51,5 @@ function calculatePackageDeps(binaryPath, arch, chromiumSysroot, vscodeSysroot)
break;
+ case 'ppc64el':
+ cmd.push(`-l${chromiumSysroot}/usr/lib/powerpc64le-linux-gnu`, `-l${chromiumSysroot}/lib/powerpc64le-linux-gnu`, `-l${vscodeSysroot}/usr/lib/powerpc64le-linux-gnu`, `-l${vscodeSysroot}/lib/powerpc64le-linux-gnu`);
+ break;
+ case 'riscv64':
+ cmd.push(`-l${chromiumSysroot}/usr/lib/riscv64-linux-gnu`, `-l${chromiumSysroot}/lib/riscv64-linux-gnu`, `-l${vscodeSysroot}/usr/lib/riscv64-linux-gnu`, `-l${vscodeSysroot}/lib/riscv64-linux-gnu`);
+ break;
}
diff --git a/build/linux/debian/calculate-deps.ts b/build/linux/debian/calculate-deps.ts
index 92f8065..b86b4db 100644
index c44e241..5a6e9b4 100644
--- a/build/linux/debian/calculate-deps.ts
+++ b/build/linux/debian/calculate-deps.ts
@@ -61,2 +61,14 @@ function calculatePackageDeps(binaryPath: string, arch: DebianArchString, chromi
@@ -61,2 +61,8 @@ function calculatePackageDeps(binaryPath: string, arch: DebianArchString, chromi
break;
+ case 'ppc64el':
+ cmd.push(`-l${chromiumSysroot}/usr/lib/powerpc64le-linux-gnu`,
+ `-l${chromiumSysroot}/lib/powerpc64le-linux-gnu`,
+ `-l${vscodeSysroot}/usr/lib/powerpc64le-linux-gnu`,
+ `-l${vscodeSysroot}/lib/powerpc64le-linux-gnu`);
+ break;
+ case 'riscv64':
+ cmd.push(`-l${chromiumSysroot}/usr/lib/riscv64-linux-gnu`,
+ `-l${chromiumSysroot}/lib/riscv64-linux-gnu`,
+ `-l${vscodeSysroot}/usr/lib/riscv64-linux-gnu`,
+ `-l${vscodeSysroot}/lib/riscv64-linux-gnu`);
+ break;
}
diff --git a/build/linux/debian/dep-lists.js b/build/linux/debian/dep-lists.js
index 3a642a7..91daf09 100644
index 306d91e..64377e3 100644
--- a/build/linux/debian/dep-lists.js
+++ b/build/linux/debian/dep-lists.js
@@ -144,2 +144,81 @@ exports.referenceGeneratedDepsByArch = {
'xdg-utils (>= 1.0.2)'
+ ],
@@ -139,2 +139,41 @@ exports.referenceGeneratedDepsByArch = {
],
+ 'ppc64el': [
+ 'ca-certificates',
+ 'libasound2 (>= 1.0.17)',
@ -195,53 +143,13 @@ index 3a642a7..91daf09 100644
+ 'libxrandr2',
+ 'xdg-utils (>= 1.0.2)'
+ ],
+ 'riscv64': [
+ 'ca-certificates',
+ 'libatomic1',
+ 'libasound2 (>= 1.0.17)',
+ 'libatk-bridge2.0-0 (>= 2.5.3)',
+ 'libatk1.0-0 (>= 2.2.0)',
+ 'libatspi2.0-0 (>= 2.9.90)',
+ 'libc6 (>= 2.17)',
+ 'libc6 (>= 2.28)',
+ 'libcairo2 (>= 1.6.0)',
+ 'libcurl3-gnutls | libcurl3-nss | libcurl4 | libcurl3',
+ 'libdbus-1-3 (>= 1.0.2)',
+ 'libdrm2 (>= 2.4.60)',
+ 'libexpat1 (>= 2.0.1)',
+ 'libgbm1 (>= 17.1.0~rc2)',
+ 'libglib2.0-0 (>= 2.16.0)',
+ 'libglib2.0-0 (>= 2.39.4)',
+ 'libgtk-3-0 (>= 3.9.10)',
+ 'libgtk-3-0 (>= 3.9.10) | libgtk-4-1',
+ 'libnspr4 (>= 2:4.9-2~)',
+ 'libnss3 (>= 2:3.22)',
+ 'libnss3 (>= 3.26)',
+ 'libpango-1.0-0 (>= 1.14.0)',
+ 'libsecret-1-0 (>= 0.18)',
+ 'libstdc++6 (>= 4.1.1)',
+ 'libstdc++6 (>= 5)',
+ 'libstdc++6 (>= 5.2)',
+ 'libstdc++6 (>= 6)',
+ 'libx11-6',
+ 'libx11-6 (>= 2:1.4.99.1)',
+ 'libxcb1 (>= 1.9.2)',
+ 'libxcomposite1 (>= 1:0.4.4-1)',
+ 'libxdamage1 (>= 1:1.1)',
+ 'libxext6',
+ 'libxfixes3',
+ 'libxkbcommon0 (>= 0.4.1)',
+ 'libxkbfile1',
+ 'libxrandr2',
+ 'xdg-utils (>= 1.0.2)'
]
};
diff --git a/build/linux/debian/dep-lists.ts b/build/linux/debian/dep-lists.ts
index 86d1de1..ab0e268 100644
index 9f29943..aa769ad 100644
--- a/build/linux/debian/dep-lists.ts
+++ b/build/linux/debian/dep-lists.ts
@@ -144,2 +144,81 @@ export const referenceGeneratedDepsByArch = {
'xdg-utils (>= 1.0.2)'
+ ],
@@ -139,2 +139,41 @@ export const referenceGeneratedDepsByArch = {
],
+ 'ppc64el': [
+ 'ca-certificates',
+ 'libasound2 (>= 1.0.17)',
@ -281,129 +189,56 @@ index 86d1de1..ab0e268 100644
+ 'libxrandr2',
+ 'xdg-utils (>= 1.0.2)'
+ ],
+ 'riscv64': [
+ 'ca-certificates',
+ 'libatomic1',
+ 'libasound2 (>= 1.0.17)',
+ 'libatk-bridge2.0-0 (>= 2.5.3)',
+ 'libatk1.0-0 (>= 2.2.0)',
+ 'libatspi2.0-0 (>= 2.9.90)',
+ 'libc6 (>= 2.17)',
+ 'libc6 (>= 2.28)',
+ 'libcairo2 (>= 1.6.0)',
+ 'libcurl3-gnutls | libcurl3-nss | libcurl4 | libcurl3',
+ 'libdbus-1-3 (>= 1.0.2)',
+ 'libdrm2 (>= 2.4.60)',
+ 'libexpat1 (>= 2.0.1)',
+ 'libgbm1 (>= 17.1.0~rc2)',
+ 'libglib2.0-0 (>= 2.16.0)',
+ 'libglib2.0-0 (>= 2.39.4)',
+ 'libgtk-3-0 (>= 3.9.10)',
+ 'libgtk-3-0 (>= 3.9.10) | libgtk-4-1',
+ 'libnspr4 (>= 2:4.9-2~)',
+ 'libnss3 (>= 2:3.22)',
+ 'libnss3 (>= 3.26)',
+ 'libpango-1.0-0 (>= 1.14.0)',
+ 'libsecret-1-0 (>= 0.18)',
+ 'libstdc++6 (>= 4.1.1)',
+ 'libstdc++6 (>= 5)',
+ 'libstdc++6 (>= 5.2)',
+ 'libstdc++6 (>= 6)',
+ 'libx11-6',
+ 'libx11-6 (>= 2:1.4.99.1)',
+ 'libxcb1 (>= 1.9.2)',
+ 'libxcomposite1 (>= 1:0.4.4-1)',
+ 'libxdamage1 (>= 1:1.1)',
+ 'libxext6',
+ 'libxfixes3',
+ 'libxkbcommon0 (>= 0.4.1)',
+ 'libxkbfile1',
+ 'libxrandr2',
+ 'xdg-utils (>= 1.0.2)'
]
};
diff --git a/build/linux/debian/install-sysroot.js b/build/linux/debian/install-sysroot.js
index feca7d3..f075ebc 100644
index 2cd8f2d..aef739c 100644
--- a/build/linux/debian/install-sysroot.js
+++ b/build/linux/debian/install-sysroot.js
@@ -72,3 +72,6 @@ async function fetchUrl(options, retries = 10, retryDelay = 1000) {
try {
- const response = await fetch(`https://api.github.com/repos/Microsoft/vscode-linux-build-agent/releases/tags/v${version}`, {
+ // if VSCODE_SYSROOT_REPO and VSCODE_SYSROOT_VERSION are set, use those instead
+ const repo = process.env['VSCODE_SYSROOT_REPO'] ?? 'Microsoft/vscode-linux-build-agent';
+ const actualVersion = process.env['VSCODE_SYSROOT_VERSION'] ?? version;
+ const response = await fetch(`https://api.github.com/repos/${repo}/releases/tags/v${actualVersion}`, {
headers: ghApiHeaders,
@@ -81,3 +84,3 @@ async function fetchUrl(options, retries = 10, retryDelay = 1000) {
if (!asset) {
- throw new Error(`Could not find asset in release of Microsoft/vscode-linux-build-agent @ ${version}`);
+ throw new Error(`Could not find asset in release of ${repo} @ ${actualVersion}`);
}
@@ -136,2 +139,10 @@ async function getVSCodeSysroot(arch) {
@@ -137,2 +137,6 @@ async function getVSCodeSysroot(arch) {
break;
+ case 'ppc64le':
+ expectedName = `powerpc64le-linux-gnu${prefix}.tar.gz`;
+ triple = `powerpc64le-linux-gnu`;
+ break;
+ case 'riscv64':
+ expectedName = `riscv64-linux-gnu${prefix}.tar.gz`;
+ triple = 'riscv64-linux-gnu';
+ break;
+ case 'ppc64le':
+ expectedName = `powerpc64le-linux-gnu${prefix}.tar.gz`;
+ triple = `powerpc64le-linux-gnu`;
+ break;
}
diff --git a/build/linux/debian/install-sysroot.ts b/build/linux/debian/install-sysroot.ts
index aa417dc..58f0eee 100644
index d8de38e..53b4866 100644
--- a/build/linux/debian/install-sysroot.ts
+++ b/build/linux/debian/install-sysroot.ts
@@ -84,3 +84,6 @@ async function fetchUrl(options: IFetchOptions, retries = 10, retryDelay = 1000)
try {
- const response = await fetch(`https://api.github.com/repos/Microsoft/vscode-linux-build-agent/releases/tags/v${version}`, {
+ // if VSCODE_SYSROOT_REPO and VSCODE_SYSROOT_VERSION are set, use those instead
+ const repo = process.env['VSCODE_SYSROOT_REPO'] ?? 'Microsoft/vscode-linux-build-agent';
+ const actualVersion = process.env['VSCODE_SYSROOT_VERSION'] ?? version;
+ const response = await fetch(`https://api.github.com/repos/${repo}/releases/tags/v${actualVersion}`, {
headers: ghApiHeaders,
@@ -93,3 +96,3 @@ async function fetchUrl(options: IFetchOptions, retries = 10, retryDelay = 1000)
if (!asset) {
- throw new Error(`Could not find asset in release of Microsoft/vscode-linux-build-agent @ ${version}`);
+ throw new Error(`Could not find asset in release of ${repo} @ ${actualVersion}`);
}
@@ -153,2 +156,10 @@ export async function getVSCodeSysroot(arch: DebianArchString): Promise<string>
@@ -154,2 +154,6 @@ export async function getVSCodeSysroot(arch: DebianArchString): Promise<string>
break;
+ case 'ppc64el':
+ case 'ppc64le':
+ expectedName = `powerpc64le-linux-gnu${prefix}.tar.gz`;
+ triple = 'powerpc64le-linux-gnu'
+ break;
+ case 'riscv64':
+ expectedName = `riscv64-linux-gnu${prefix}.tar.gz`;
+ triple = 'riscv64-linux-gnu';
+ triple = `powerpc64le-linux-gnu`;
+ break;
}
diff --git a/build/linux/debian/types.js b/build/linux/debian/types.js
index ce21d50..cadefc2 100644
index ce21d50..2c56b9c 100644
--- a/build/linux/debian/types.js
+++ b/build/linux/debian/types.js
@@ -8,3 +8,3 @@ exports.isDebianArchString = isDebianArchString;
function isDebianArchString(s) {
- return ['amd64', 'armhf', 'arm64'].includes(s);
+ return ['amd64', 'armhf', 'arm64', 'ppc64el', 'riscv64'].includes(s);
+ return ['amd64', 'armhf', 'arm64', 'ppc64el'].includes(s);
}
diff --git a/build/linux/debian/types.ts b/build/linux/debian/types.ts
index e97485e..24fe452 100644
index e97485e..43f2434 100644
--- a/build/linux/debian/types.ts
+++ b/build/linux/debian/types.ts
@@ -5,6 +5,6 @@
-export type DebianArchString = 'amd64' | 'armhf' | 'arm64';
+export type DebianArchString = 'amd64' | 'armhf' | 'arm64' | 'ppc64el' | 'riscv64';
+export type DebianArchString = 'amd64' | 'armhf' | 'arm64' | 'ppc64el';
export function isDebianArchString(s: string): s is DebianArchString {
- return ['amd64', 'armhf', 'arm64'].includes(s);
+ return ['amd64', 'armhf', 'arm64', 'ppc64el', 'riscv64'].includes(s);
+ return ['amd64', 'armhf', 'arm64', 'ppc64el'].includes(s);
}
diff --git a/build/linux/rpm/dep-lists.js b/build/linux/rpm/dep-lists.js
index 9798451..bd246e7 100644
index 04abee1..779dd69 100644
--- a/build/linux/rpm/dep-lists.js
+++ b/build/linux/rpm/dep-lists.js
@@ -321,2 +321,102 @@ exports.referenceGeneratedDepsByArch = {
@@ -310,2 +310,102 @@ exports.referenceGeneratedDepsByArch = {
'xdg-utils'
+ ],
+ "ppc64le": [
@ -507,10 +342,10 @@ index 9798451..bd246e7 100644
+ 'xdg-utils'
]
diff --git a/build/linux/rpm/dep-lists.ts b/build/linux/rpm/dep-lists.ts
index b798127..c3f5308 100644
index 8761e40..1885210 100644
--- a/build/linux/rpm/dep-lists.ts
+++ b/build/linux/rpm/dep-lists.ts
@@ -320,2 +320,102 @@ export const referenceGeneratedDepsByArch = {
@@ -309,2 +309,102 @@ export const referenceGeneratedDepsByArch = {
'xdg-utils'
+ ],
+ "ppc64le": [
@ -614,121 +449,105 @@ index b798127..c3f5308 100644
+ 'xdg-utils'
]
diff --git a/build/linux/rpm/types.js b/build/linux/rpm/types.js
index a20b9c2..99a8cff 100644
index a20b9c2..7b58961 100644
--- a/build/linux/rpm/types.js
+++ b/build/linux/rpm/types.js
@@ -8,3 +8,3 @@ exports.isRpmArchString = isRpmArchString;
function isRpmArchString(s) {
- return ['x86_64', 'armv7hl', 'aarch64'].includes(s);
+ return ['x86_64', 'armv7hl', 'aarch64', 'ppc64le', 'riscv64'].includes(s);
+ return ['x86_64', 'armv7hl', 'aarch64', 'ppc64le'].includes(s);
}
diff --git a/build/linux/rpm/types.ts b/build/linux/rpm/types.ts
index c6a01da..d94537e 100644
index c6a01da..3f3c3f5 100644
--- a/build/linux/rpm/types.ts
+++ b/build/linux/rpm/types.ts
@@ -5,6 +5,6 @@
-export type RpmArchString = 'x86_64' | 'armv7hl' | 'aarch64';
+export type RpmArchString = 'x86_64' | 'armv7hl' | 'aarch64' | 'ppc64le' | 'riscv64';
+export type RpmArchString = 'x86_64' | 'armv7hl' | 'aarch64' | 'ppc64le';
export function isRpmArchString(s: string): s is RpmArchString {
- return ['x86_64', 'armv7hl', 'aarch64'].includes(s);
+ return ['x86_64', 'armv7hl', 'aarch64', 'ppc64le', 'riscv64'].includes(s);
+ return ['x86_64', 'armv7hl', 'aarch64', 'ppc64le'].includes(s);
}
diff --git a/cli/src/update_service.rs b/cli/src/update_service.rs
index 4bec13d..3debda1 100644
index 9033914..bcab676 100644
--- a/cli/src/update_service.rs
+++ b/cli/src/update_service.rs
@@ -216,2 +216,5 @@ pub enum Platform {
@@ -217,2 +217,4 @@ pub enum Platform {
LinuxARM32Legacy,
+ LinuxPPC64LE,
+ LinuxPPC64LELegacy,
+ LinuxRISCV64,
DarwinX64,
@@ -229,2 +232,4 @@ impl Platform {
@@ -230,2 +232,3 @@ impl Platform {
Platform::LinuxARM32 => Some("linux-armhf".to_owned()),
+ Platform::LinuxPPC64LE => Some("linux-ppc64le".to_owned()),
+ Platform::LinuxRISCV64 => Some("linux-riscv64".to_owned()),
Platform::DarwinX64 => Some("darwin".to_owned()),
@@ -247,2 +252,5 @@ impl Platform {
@@ -248,2 +251,4 @@ impl Platform {
Platform::LinuxARM32Legacy => "server-linux-legacy-armhf",
+ Platform::LinuxPPC64LE => "server-linux-ppc64le",
+ Platform::LinuxPPC64LELegacy => "server-linux-legacy-ppc64le",
+ Platform::LinuxRISCV64 => "server-linux-riscv64",
Platform::DarwinX64 => "server-darwin",
@@ -266,2 +274,5 @@ impl Platform {
@@ -267,2 +272,4 @@ impl Platform {
Platform::LinuxARM32Legacy => "cli-linux-armhf",
+ Platform::LinuxPPC64LE => "cli-linux-ppc64le",
+ Platform::LinuxPPC64LELegacy => "cli-linux-ppc64le",
+ Platform::LinuxRISCV64 => "cli-linux-riscv64",
Platform::DarwinX64 => "cli-darwin-x64",
@@ -298,2 +309,6 @@ impl Platform {
@@ -299,2 +306,4 @@ impl Platform {
Some(Platform::LinuxARM64)
+ } else if cfg!(all(target_os = "linux", target_arch = "ppc64le")) {
+ Some(Platform::LinuxPPC64LE)
+ } else if cfg!(all(target_os = "linux", target_arch = "riscv64")) {
+ Some(Platform::LinuxRISCV64)
} else if cfg!(all(target_os = "macos", target_arch = "x86_64")) {
@@ -325,2 +340,5 @@ impl fmt::Display for Platform {
@@ -326,2 +335,4 @@ impl fmt::Display for Platform {
Platform::LinuxARM32Legacy => "LinuxARM32Legacy",
+ Platform::LinuxPPC64LE => "LinuxPPC64LE",
+ Platform::LinuxPPC64LELegacy => "LinuxPPC64LELegacy",
+ Platform::LinuxRISCV64 => "LinuxRISCV64",
Platform::DarwinX64 => "DarwinX64",
diff --git a/cli/src/util/prereqs.rs b/cli/src/util/prereqs.rs
index 0f49ab2..d873a49 100644
index e0fba27..4827a47 100644
--- a/cli/src/util/prereqs.rs
+++ b/cli/src/util/prereqs.rs
@@ -86,2 +86,6 @@ impl PreReqChecker {
@@ -86,2 +86,4 @@ impl PreReqChecker {
Platform::LinuxARM32
+ } else if cfg!(target_arch = "ppc64le") {
+ Platform::LinuxPPC64LE
+ } else if cfg!(target_arch = "riscv64") {
+ Platform::LinuxRISCV64
} else {
@@ -95,2 +99,4 @@ impl PreReqChecker {
@@ -95,2 +97,4 @@ impl PreReqChecker {
Platform::LinuxARM32Legacy
+ } else if cfg!(target_arch = "ppc64le") {
+ Platform::LinuxPPC64LELegacy
} else {
diff --git a/resources/server/bin/helpers/check-requirements-linux.sh b/resources/server/bin/helpers/check-requirements-linux.sh
index 31a618f..dc457e0 100644
index 8ef07a2..00dd3e2 100644
--- a/resources/server/bin/helpers/check-requirements-linux.sh
+++ b/resources/server/bin/helpers/check-requirements-linux.sh
@@ -56,2 +56,4 @@ case $ARCH in
@@ -56,2 +56,3 @@ case $ARCH in
;;
+ ppc64el) LDCONFIG_ARCH="64bit";;
+ riscv64) LDCONFIG_ARCH="RISC-V";;
esac
diff --git a/src/vs/platform/extensionManagement/common/extensionManagement.ts b/src/vs/platform/extensionManagement/common/extensionManagement.ts
index 1dcc4c7..54a7f36 100644
index ea7b30d..004df84 100644
--- a/src/vs/platform/extensionManagement/common/extensionManagement.ts
+++ b/src/vs/platform/extensionManagement/common/extensionManagement.ts
@@ -41,2 +41,4 @@ export function TargetPlatformToString(targetPlatform: TargetPlatform) {
@@ -41,2 +41,3 @@ export function TargetPlatformToString(targetPlatform: TargetPlatform) {
case TargetPlatform.LINUX_ARMHF: return 'Linux ARM';
+ case TargetPlatform.LINUX_PPC64LE: return 'Linux PowerPC64';
+ case TargetPlatform.LINUX_RISCV64: return 'Linux RISC-V 64';
@@ -64,2 +66,4 @@ export function toTargetPlatform(targetPlatform: string): TargetPlatform {
@@ -64,2 +65,3 @@ export function toTargetPlatform(targetPlatform: string): TargetPlatform {
case TargetPlatform.LINUX_ARMHF: return TargetPlatform.LINUX_ARMHF;
+ case TargetPlatform.LINUX_PPC64LE: return TargetPlatform.LINUX_PPC64LE;
+ case TargetPlatform.LINUX_RISCV64: return TargetPlatform.LINUX_RISCV64;
@@ -99,2 +103,8 @@ export function getTargetPlatform(platform: Platform | 'alpine', arch: string |
@@ -99,2 +101,5 @@ export function getTargetPlatform(platform: Platform | 'alpine', arch: string |
}
+ if (arch === 'ppc64le') {
+ return TargetPlatform.LINUX_PPC64LE;
+ }
+ if (arch === 'riscv64') {
+ return TargetPlatform.LINUX_RISCV64;
+ }
return TargetPlatform.UNKNOWN;
diff --git a/src/vs/platform/extensions/common/extensions.ts b/src/vs/platform/extensions/common/extensions.ts
index 822260b..fc11650 100644
index 5973d4d..a7d6298 100644
--- a/src/vs/platform/extensions/common/extensions.ts
+++ b/src/vs/platform/extensions/common/extensions.ts
@@ -294,2 +294,4 @@ export const enum TargetPlatform {
@@ -294,2 +294,3 @@ export const enum TargetPlatform {
LINUX_ARMHF = 'linux-armhf',
+ LINUX_PPC64LE = 'linux-ppc64le',
+ LINUX_RISCV64 = 'linux-riscv64',

View File

@ -0,0 +1,297 @@
diff --git a/build/gulpfile.reh.js b/build/gulpfile.reh.js
index 8c83c13..b996472 100644
--- a/build/gulpfile.reh.js
+++ b/build/gulpfile.reh.js
@@ -51,2 +51,3 @@ const BUILD_TARGETS = [
{ platform: 'linux', arch: 'ppc64le' },
+ { platform: 'linux', arch: 'riscv64' },
{ platform: 'alpine', arch: 'arm64' },
diff --git a/build/gulpfile.scan.js b/build/gulpfile.scan.js
index 274d889..0eafadc 100644
--- a/build/gulpfile.scan.js
+++ b/build/gulpfile.scan.js
@@ -27,2 +27,3 @@ const BUILD_TARGETS = [
{ platform: 'linux', arch: 'ppc64le' },
+ { platform: 'linux', arch: 'riscv64' },
];
diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js
index 7395ba4..66bf180 100644
--- a/build/gulpfile.vscode.js
+++ b/build/gulpfile.vscode.js
@@ -495,2 +495,3 @@ const BUILD_TARGETS = [
{ platform: 'linux', arch: 'ppc64le' },
+ { platform: 'linux', arch: 'riscv64' },
];
diff --git a/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js
index 264cec1..37575e1 100644
--- a/build/gulpfile.vscode.linux.js
+++ b/build/gulpfile.vscode.linux.js
@@ -33,3 +33,3 @@ const linuxPackageRevision = Math.floor(new Date().getTime() / 1000);
function getDebPackageArch(arch) {
- return { x64: 'amd64', armhf: 'armhf', arm64: 'arm64', ppc64le: 'ppc64el' }[arch];
+ return { x64: 'amd64', armhf: 'armhf', arm64: 'arm64', ppc64le: 'ppc64el', riscv64: 'riscv64' }[arch];
}
@@ -145,3 +145,3 @@ function getRpmBuildPath(rpmArch) {
function getRpmPackageArch(arch) {
- return { x64: 'x86_64', armhf: 'armv7hl', arm64: 'aarch64', ppc64le: 'ppc64le' }[arch];
+ return { x64: 'x86_64', armhf: 'armv7hl', arm64: 'aarch64', ppc64le: 'ppc64le', riscv64: 'riscv64' }[arch];
}
@@ -308,2 +308,3 @@ const BUILD_TARGETS = [
{ arch: 'ppc64le' },
+ { arch: 'riscv64' },
];
diff --git a/build/linux/debian/calculate-deps.js b/build/linux/debian/calculate-deps.js
index b97d275..37a5835 100644
--- a/build/linux/debian/calculate-deps.js
+++ b/build/linux/debian/calculate-deps.js
@@ -54,2 +54,5 @@ function calculatePackageDeps(binaryPath, arch, chromiumSysroot, vscodeSysroot)
break;
+ case 'riscv64':
+ cmd.push(`-l${chromiumSysroot}/usr/lib/riscv64-linux-gnu`, `-l${chromiumSysroot}/lib/riscv64-linux-gnu`, `-l${vscodeSysroot}/usr/lib/riscv64-linux-gnu`, `-l${vscodeSysroot}/lib/riscv64-linux-gnu`);
+ break;
}
diff --git a/build/linux/debian/calculate-deps.ts b/build/linux/debian/calculate-deps.ts
index 5a6e9b4..903375f 100644
--- a/build/linux/debian/calculate-deps.ts
+++ b/build/linux/debian/calculate-deps.ts
@@ -67,2 +67,8 @@ function calculatePackageDeps(binaryPath: string, arch: DebianArchString, chromi
break;
+ case 'riscv64':
+ cmd.push(`-l${chromiumSysroot}/usr/lib/riscv64-linux-gnu`,
+ `-l${chromiumSysroot}/lib/riscv64-linux-gnu`,
+ `-l${vscodeSysroot}/usr/lib/riscv64-linux-gnu`,
+ `-l${vscodeSysroot}/lib/riscv64-linux-gnu`);
+ break;
}
diff --git a/build/linux/debian/dep-lists.js b/build/linux/debian/dep-lists.js
index 64377e3..5fb20f8 100644
--- a/build/linux/debian/dep-lists.js
+++ b/build/linux/debian/dep-lists.js
@@ -178,2 +178,42 @@ exports.referenceGeneratedDepsByArch = {
],
+ 'riscv64': [
+ 'ca-certificates',
+ 'libatomic1',
+ 'libasound2 (>= 1.0.17)',
+ 'libatk-bridge2.0-0 (>= 2.5.3)',
+ 'libatk1.0-0 (>= 2.2.0)',
+ 'libatspi2.0-0 (>= 2.9.90)',
+ 'libc6 (>= 2.17)',
+ 'libc6 (>= 2.28)',
+ 'libcairo2 (>= 1.6.0)',
+ 'libcurl3-gnutls | libcurl3-nss | libcurl4 | libcurl3',
+ 'libdbus-1-3 (>= 1.0.2)',
+ 'libdrm2 (>= 2.4.60)',
+ 'libexpat1 (>= 2.0.1)',
+ 'libgbm1 (>= 17.1.0~rc2)',
+ 'libglib2.0-0 (>= 2.16.0)',
+ 'libglib2.0-0 (>= 2.39.4)',
+ 'libgtk-3-0 (>= 3.9.10)',
+ 'libgtk-3-0 (>= 3.9.10) | libgtk-4-1',
+ 'libnspr4 (>= 2:4.9-2~)',
+ 'libnss3 (>= 2:3.22)',
+ 'libnss3 (>= 3.26)',
+ 'libpango-1.0-0 (>= 1.14.0)',
+ 'libsecret-1-0 (>= 0.18)',
+ 'libstdc++6 (>= 4.1.1)',
+ 'libstdc++6 (>= 5)',
+ 'libstdc++6 (>= 5.2)',
+ 'libstdc++6 (>= 6)',
+ 'libx11-6',
+ 'libx11-6 (>= 2:1.4.99.1)',
+ 'libxcb1 (>= 1.9.2)',
+ 'libxcomposite1 (>= 1:0.4.4-1)',
+ 'libxdamage1 (>= 1:1.1)',
+ 'libxext6',
+ 'libxfixes3',
+ 'libxkbcommon0 (>= 0.4.1)',
+ 'libxkbfile1',
+ 'libxrandr2',
+ 'xdg-utils (>= 1.0.2)'
+ ],
};
diff --git a/build/linux/debian/dep-lists.ts b/build/linux/debian/dep-lists.ts
index aa769ad..5534874 100644
--- a/build/linux/debian/dep-lists.ts
+++ b/build/linux/debian/dep-lists.ts
@@ -178,2 +178,42 @@ export const referenceGeneratedDepsByArch = {
],
+ 'riscv64': [
+ 'ca-certificates',
+ 'libatomic1',
+ 'libasound2 (>= 1.0.17)',
+ 'libatk-bridge2.0-0 (>= 2.5.3)',
+ 'libatk1.0-0 (>= 2.2.0)',
+ 'libatspi2.0-0 (>= 2.9.90)',
+ 'libc6 (>= 2.17)',
+ 'libc6 (>= 2.28)',
+ 'libcairo2 (>= 1.6.0)',
+ 'libcurl3-gnutls | libcurl3-nss | libcurl4 | libcurl3',
+ 'libdbus-1-3 (>= 1.0.2)',
+ 'libdrm2 (>= 2.4.60)',
+ 'libexpat1 (>= 2.0.1)',
+ 'libgbm1 (>= 17.1.0~rc2)',
+ 'libglib2.0-0 (>= 2.16.0)',
+ 'libglib2.0-0 (>= 2.39.4)',
+ 'libgtk-3-0 (>= 3.9.10)',
+ 'libgtk-3-0 (>= 3.9.10) | libgtk-4-1',
+ 'libnspr4 (>= 2:4.9-2~)',
+ 'libnss3 (>= 2:3.22)',
+ 'libnss3 (>= 3.26)',
+ 'libpango-1.0-0 (>= 1.14.0)',
+ 'libsecret-1-0 (>= 0.18)',
+ 'libstdc++6 (>= 4.1.1)',
+ 'libstdc++6 (>= 5)',
+ 'libstdc++6 (>= 5.2)',
+ 'libstdc++6 (>= 6)',
+ 'libx11-6',
+ 'libx11-6 (>= 2:1.4.99.1)',
+ 'libxcb1 (>= 1.9.2)',
+ 'libxcomposite1 (>= 1:0.4.4-1)',
+ 'libxdamage1 (>= 1:1.1)',
+ 'libxext6',
+ 'libxfixes3',
+ 'libxkbcommon0 (>= 0.4.1)',
+ 'libxkbfile1',
+ 'libxrandr2',
+ 'xdg-utils (>= 1.0.2)'
+ ],
};
diff --git a/build/linux/debian/install-sysroot.js b/build/linux/debian/install-sysroot.js
index 3dcd5c1..b4e3542 100644
--- a/build/linux/debian/install-sysroot.js
+++ b/build/linux/debian/install-sysroot.js
@@ -141,2 +141,6 @@ async function getVSCodeSysroot(arch) {
break;
+ case 'riscv64':
+ expectedName = `riscv64-linux-gnu${prefix}.tar.gz`;
+ triple = 'riscv64-linux-gnu';
+ break;
}
diff --git a/build/linux/debian/install-sysroot.ts b/build/linux/debian/install-sysroot.ts
index 52b3422..11d54b1 100644
--- a/build/linux/debian/install-sysroot.ts
+++ b/build/linux/debian/install-sysroot.ts
@@ -158,2 +158,6 @@ export async function getVSCodeSysroot(arch: DebianArchString): Promise<string>
break;
+ case 'riscv64':
+ expectedName = `riscv64-linux-gnu${prefix}.tar.gz`;
+ triple = 'riscv64-linux-gnu';
+ break;
}
diff --git a/build/linux/debian/types.js b/build/linux/debian/types.js
index 2c56b9c..cadefc2 100644
--- a/build/linux/debian/types.js
+++ b/build/linux/debian/types.js
@@ -8,3 +8,3 @@ exports.isDebianArchString = isDebianArchString;
function isDebianArchString(s) {
- return ['amd64', 'armhf', 'arm64', 'ppc64el'].includes(s);
+ return ['amd64', 'armhf', 'arm64', 'ppc64el', 'riscv64'].includes(s);
}
diff --git a/build/linux/debian/types.ts b/build/linux/debian/types.ts
index 43f2434..24fe452 100644
--- a/build/linux/debian/types.ts
+++ b/build/linux/debian/types.ts
@@ -5,6 +5,6 @@
-export type DebianArchString = 'amd64' | 'armhf' | 'arm64' | 'ppc64el';
+export type DebianArchString = 'amd64' | 'armhf' | 'arm64' | 'ppc64el' | 'riscv64';
export function isDebianArchString(s: string): s is DebianArchString {
- return ['amd64', 'armhf', 'arm64', 'ppc64el'].includes(s);
+ return ['amd64', 'armhf', 'arm64', 'ppc64el', 'riscv64'].includes(s);
}
diff --git a/build/linux/rpm/types.js b/build/linux/rpm/types.js
index 7b58961..99a8cff 100644
--- a/build/linux/rpm/types.js
+++ b/build/linux/rpm/types.js
@@ -8,3 +8,3 @@ exports.isRpmArchString = isRpmArchString;
function isRpmArchString(s) {
- return ['x86_64', 'armv7hl', 'aarch64', 'ppc64le'].includes(s);
+ return ['x86_64', 'armv7hl', 'aarch64', 'ppc64le', 'riscv64'].includes(s);
}
diff --git a/build/linux/rpm/types.ts b/build/linux/rpm/types.ts
index 3f3c3f5..d94537e 100644
--- a/build/linux/rpm/types.ts
+++ b/build/linux/rpm/types.ts
@@ -5,6 +5,6 @@
-export type RpmArchString = 'x86_64' | 'armv7hl' | 'aarch64' | 'ppc64le';
+export type RpmArchString = 'x86_64' | 'armv7hl' | 'aarch64' | 'ppc64le' | 'riscv64';
export function isRpmArchString(s: string): s is RpmArchString {
- return ['x86_64', 'armv7hl', 'aarch64', 'ppc64le'].includes(s);
+ return ['x86_64', 'armv7hl', 'aarch64', 'ppc64le', 'riscv64'].includes(s);
}
diff --git a/cli/src/update_service.rs b/cli/src/update_service.rs
index bcab676..29228cb 100644
--- a/cli/src/update_service.rs
+++ b/cli/src/update_service.rs
@@ -219,2 +219,3 @@ pub enum Platform {
LinuxPPC64LELegacy,
+ LinuxRISCV64,
DarwinX64,
@@ -233,2 +234,3 @@ impl Platform {
Platform::LinuxPPC64LE => Some("linux-ppc64le".to_owned()),
+ Platform::LinuxRISCV64 => Some("linux-riscv64".to_owned()),
Platform::DarwinX64 => Some("darwin".to_owned()),
@@ -253,2 +255,3 @@ impl Platform {
Platform::LinuxPPC64LELegacy => "server-linux-legacy-ppc64le",
+ Platform::LinuxRISCV64 => "server-linux-riscv64",
Platform::DarwinX64 => "server-darwin",
@@ -274,2 +277,3 @@ impl Platform {
Platform::LinuxPPC64LELegacy => "cli-linux-ppc64le",
+ Platform::LinuxRISCV64 => "cli-linux-riscv64",
Platform::DarwinX64 => "cli-darwin-x64",
@@ -308,2 +312,4 @@ impl Platform {
Some(Platform::LinuxPPC64LE)
+ } else if cfg!(all(target_os = "linux", target_arch = "riscv64")) {
+ Some(Platform::LinuxRISCV64)
} else if cfg!(all(target_os = "macos", target_arch = "x86_64")) {
@@ -337,2 +343,3 @@ impl fmt::Display for Platform {
Platform::LinuxPPC64LELegacy => "LinuxPPC64LELegacy",
+ Platform::LinuxRISCV64 => "LinuxRISCV64",
Platform::DarwinX64 => "DarwinX64",
diff --git a/cli/src/util/prereqs.rs b/cli/src/util/prereqs.rs
index 4827a47..137a257 100644
--- a/cli/src/util/prereqs.rs
+++ b/cli/src/util/prereqs.rs
@@ -88,2 +88,4 @@ impl PreReqChecker {
Platform::LinuxPPC64LE
+ } else if cfg!(target_arch = "riscv64") {
+ Platform::LinuxRISCV64
} else {
diff --git a/resources/server/bin/helpers/check-requirements-linux.sh b/resources/server/bin/helpers/check-requirements-linux.sh
index 00dd3e2..91c9d20 100644
--- a/resources/server/bin/helpers/check-requirements-linux.sh
+++ b/resources/server/bin/helpers/check-requirements-linux.sh
@@ -57,2 +57,3 @@ case $ARCH in
ppc64el) LDCONFIG_ARCH="64bit";;
+ riscv64) LDCONFIG_ARCH="RISC-V";;
esac
diff --git a/src/vs/platform/extensionManagement/common/extensionManagement.ts b/src/vs/platform/extensionManagement/common/extensionManagement.ts
index 004df84..fb2acc7 100644
--- a/src/vs/platform/extensionManagement/common/extensionManagement.ts
+++ b/src/vs/platform/extensionManagement/common/extensionManagement.ts
@@ -42,2 +42,3 @@ export function TargetPlatformToString(targetPlatform: TargetPlatform) {
case TargetPlatform.LINUX_PPC64LE: return 'Linux PowerPC64';
+ case TargetPlatform.LINUX_RISCV64: return 'Linux RISC-V 64';
@@ -66,2 +67,3 @@ export function toTargetPlatform(targetPlatform: string): TargetPlatform {
case TargetPlatform.LINUX_PPC64LE: return TargetPlatform.LINUX_PPC64LE;
+ case TargetPlatform.LINUX_RISCV64: return TargetPlatform.LINUX_RISCV64;
@@ -104,2 +106,5 @@ export function getTargetPlatform(platform: Platform | 'alpine', arch: string |
}
+ if (arch === 'riscv64') {
+ return TargetPlatform.LINUX_RISCV64;
+ }
return TargetPlatform.UNKNOWN;
diff --git a/src/vs/platform/extensions/common/extensions.ts b/src/vs/platform/extensions/common/extensions.ts
index a7d6298..a7aa2bb 100644
--- a/src/vs/platform/extensions/common/extensions.ts
+++ b/src/vs/platform/extensions/common/extensions.ts
@@ -295,2 +295,3 @@ export const enum TargetPlatform {
LINUX_PPC64LE = 'linux-ppc64le',
+ LINUX_RISCV64 = 'linux-riscv64',

View File

@ -0,0 +1,96 @@
diff --git a/build/gulpfile.reh.js b/build/gulpfile.reh.js
index df4fda0c898..ce8f21bbc0e 100644
--- a/build/gulpfile.reh.js
+++ b/build/gulpfile.reh.js
@@ -52,2 +52,3 @@ const BUILD_TARGETS = [
{ platform: 'linux', arch: 'riscv64' },
+ { platform: 'linux', arch: 'loong64' },
{ platform: 'alpine', arch: 'arm64' },
diff --git a/build/gulpfile.scan.js b/build/gulpfile.scan.js
index 0eafadc1fff..3c1d6fb5bfc 100644
--- a/build/gulpfile.scan.js
+++ b/build/gulpfile.scan.js
@@ -28,2 +28,3 @@ const BUILD_TARGETS = [
{ platform: 'linux', arch: 'riscv64' },
+ { platform: 'linux', arch: 'loong64' },
];
diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js
index b208d700f2c..4be8f93f704 100644
--- a/build/gulpfile.vscode.js
+++ b/build/gulpfile.vscode.js
@@ -489,2 +489,3 @@ const BUILD_TARGETS = [
{ platform: 'linux', arch: 'riscv64' },
+ { platform: 'linux', arch: 'loong64' },
];
diff --git a/cli/src/update_service.rs b/cli/src/update_service.rs
index 29228cb4235..c1163029377 100644
--- a/cli/src/update_service.rs
+++ b/cli/src/update_service.rs
@@ -220,2 +220,3 @@ pub enum Platform {
LinuxRISCV64,
+ LinuxLoong64,
DarwinX64,
@@ -235,2 +236,3 @@ impl Platform {
Platform::LinuxRISCV64 => Some("linux-riscv64".to_owned()),
+ Platform::LinuxLoong64 => Some("linux-loong64".to_owned()),
Platform::DarwinX64 => Some("darwin".to_owned()),
@@ -256,2 +258,3 @@ impl Platform {
Platform::LinuxRISCV64 => "server-linux-riscv64",
+ Platform::LinuxLoong64 => "server-linux-loong64",
Platform::DarwinX64 => "server-darwin",
@@ -278,2 +281,3 @@ impl Platform {
Platform::LinuxRISCV64 => "cli-linux-riscv64",
+ Platform::LinuxLoong64 => "cli-linux-loong64",
Platform::DarwinX64 => "cli-darwin-x64",
@@ -314,2 +318,4 @@ impl Platform {
Some(Platform::LinuxRISCV64)
+ } else if cfg!(all(target_os = "linux", target_arch = "loongarch64")) {
+ Some(Platform::LinuxLoong64)
} else if cfg!(all(target_os = "macos", target_arch = "x86_64")) {
@@ -344,2 +350,3 @@ impl fmt::Display for Platform {
Platform::LinuxRISCV64 => "LinuxRISCV64",
+ Platform::LinuxLoong64 => "LinuxLoong64",
Platform::DarwinX64 => "DarwinX64",
diff --git a/cli/src/util/prereqs.rs b/cli/src/util/prereqs.rs
index 137a2570130..8f1e20c2aa9 100644
--- a/cli/src/util/prereqs.rs
+++ b/cli/src/util/prereqs.rs
@@ -90,2 +90,4 @@ impl PreReqChecker {
Platform::LinuxRISCV64
+ } else if cfg!(target_arch = "loongarch64") {
+ Platform::LinuxLoong64
} else {
diff --git a/resources/server/bin/helpers/check-requirements-linux.sh b/resources/server/bin/helpers/check-requirements-linux.sh
index 91c9d203387..7776dbcbc24 100644
--- a/resources/server/bin/helpers/check-requirements-linux.sh
+++ b/resources/server/bin/helpers/check-requirements-linux.sh
@@ -58,2 +58,3 @@ case $ARCH in
riscv64) LDCONFIG_ARCH="RISC-V";;
+ loongarch64) LDCONFIG_ARCH="double-float";;
esac
diff --git a/src/vs/platform/extensionManagement/common/extensionManagement.ts b/src/vs/platform/extensionManagement/common/extensionManagement.ts
index 03e78ca3116..8e59218d7ad 100644
--- a/src/vs/platform/extensionManagement/common/extensionManagement.ts
+++ b/src/vs/platform/extensionManagement/common/extensionManagement.ts
@@ -44,2 +44,3 @@ export function TargetPlatformToString(targetPlatform: TargetPlatform) {
case TargetPlatform.LINUX_RISCV64: return 'Linux RISC-V 64';
+ case TargetPlatform.LINUX_LOONG64: return 'Linux Loong64';
@@ -69,2 +70,3 @@ export function toTargetPlatform(targetPlatform: string): TargetPlatform {
case TargetPlatform.LINUX_RISCV64: return TargetPlatform.LINUX_RISCV64;
+ case TargetPlatform.LINUX_LOONG64: return TargetPlatform.LINUX_LOONG64;
@@ -113,2 +115,5 @@ export function getTargetPlatform(platform: Platform | 'alpine', arch: string |
}
+ if (arch === 'loong64') {
+ return TargetPlatform.LINUX_LOONG64;
+ }
return TargetPlatform.UNKNOWN;
diff --git a/src/vs/platform/extensions/common/extensions.ts b/src/vs/platform/extensions/common/extensions.ts
index a7aa2bb23bf..a4d076ce596 100644
--- a/src/vs/platform/extensions/common/extensions.ts
+++ b/src/vs/platform/extensions/common/extensions.ts
@@ -296,2 +296,3 @@ export const enum TargetPlatform {
LINUX_RISCV64 = 'linux-riscv64',
+ LINUX_LOONG64 = 'linux-loong64',

View File

@ -1,9 +1,12 @@
diff --git a/build/npm/postinstall.js b/build/npm/postinstall.js
index d45d5bc..81a6449 100644
index 88e3c9e..4cad4f1 100644
--- a/build/npm/postinstall.js
+++ b/build/npm/postinstall.js
@@ -56,3 +56,3 @@ function yarnInstall(dir, opts) {
@@ -55,4 +55,6 @@ function npmInstall(dir, opts) {
opts.cwd = root;
- if (process.env['npm_config_arch'] === 'arm64') {
+ if (process.env['npm_config_arch'] === 'arm64' || process.env['npm_config_arch'] === 'arm' || process.env['npm_config_arch'] === 'ppc64' || process.env['npm_config_arch'] === 'riscv64') {
run('sudo', ['docker', 'run', '--rm', '--privileged', 'multiarch/qemu-user-static', '--reset', '-p', 'yes'], opts);
+ } else if (process.env['npm_config_arch'] === 'loong64') {
+ run('sudo', ['docker', 'run', '--rm', '--privileged', 'loongcr.lcpu.dev/multiarch/archlinux', '--reset', '-p', 'yes'], opts);
}

11
ripgrep_linux_loong64.sh Executable file
View File

@ -0,0 +1,11 @@
# When installing @vscode/ripgrep, it will try to download prebuilt ripgrep binary from https://github.com/microsoft/ripgrep-prebuilt,
# however, loong64 is not a supported architecture and x86 will be picked as fallback, so we need to replace it with a native one.
RG_PATH="node_modules/@vscode/ripgrep/bin/rg"
RG_VERSION="14.1.1"
echo "Replacing ripgrep binary with loong64 one"
rm "${RG_PATH}"
curl --silent --fail -L https://github.com/darkyzhou/ripgrep-loongarch64-musl/releases/download/${RG_VERSION}/rg -o "${RG_PATH}"
chmod +x "${RG_PATH}"