diff --git a/package_linux_bin.sh b/package_linux_bin.sh index 3fecf7cb8b4..c5fd98616a6 100755 --- a/package_linux_bin.sh +++ b/package_linux_bin.sh @@ -16,6 +16,12 @@ 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' + export VSCODE_SYSROOT_VERSION='20240129-253798' + export VSCODE_SYSROOT_PREFIX='-glibc-2.28' +fi + if [[ -d "../patches/${OS_NAME}/client/" ]]; then for file in "../patches/${OS_NAME}/client/"*.patch; do if [[ -f "${file}" ]]; then @@ -37,7 +43,11 @@ for i in {1..5}; do # try 5 times echo "Yarn failed $i, trying again..." done -./build/azure-pipelines/linux/setup-env.sh +if [[ "${VSCODE_ARCH}" == "ppc64le" ]]; then + source ./build/azure-pipelines/linux/setup-env.sh +else + ./build/azure-pipelines/linux/setup-env.sh +fi for i in {1..5}; do # try 5 times yarn --check-files && break diff --git a/patches/ppc64le-and-riscv64-support.patch b/patches/ppc64le-support.patch similarity index 62% rename from patches/ppc64le-and-riscv64-support.patch rename to patches/ppc64le-support.patch index 6f98d1cf84f..d9b22399eab 100644 --- a/patches/ppc64le-and-riscv64-support.patch +++ b/patches/ppc64le-support.patch @@ -1,19 +1,8 @@ diff --git a/build/azure-pipelines/linux/setup-env.sh b/build/azure-pipelines/linux/setup-env.sh -index e42a6b12b1f..b31af12b086 100755 +index 9bfbf9ab41a..883f7d0abd5 100755 --- a/build/azure-pipelines/linux/setup-env.sh +++ b/build/azure-pipelines/linux/setup-env.sh -@@ -7,6 +7,10 @@ if [ "$SYSROOT_ARCH" == "x64" ]; then - SYSROOT_ARCH="amd64" - fi - -+if [ "$npm_config_arch" == "riscv64" ]; then -+ exit 0 -+fi -+ - export VSCODE_SYSROOT_DIR=$PWD/.build/sysroots - SYSROOT_ARCH="$SYSROOT_ARCH" node -e '(async () => { const { getVSCodeSysroot } = require("./build/linux/debian/install-sysroot.js"); await getVSCodeSysroot(process.env["SYSROOT_ARCH"]); })()' - -@@ -67,4 +71,19 @@ elif [ "$npm_config_arch" == "arm" ]; then +@@ -67,4 +67,19 @@ elif [ "$npm_config_arch" == "arm" ]; then export VSCODE_REMOTE_CXXFLAGS="--sysroot=$VSCODE_SYSROOT_DIR/arm-rpi-linux-gnueabihf/arm-rpi-linux-gnueabihf/sysroot" 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" fi @@ -56,61 +45,43 @@ index 0b5f38c60ce..9f3b02beee3 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 c2b81d0cf7c..fa5de83a076 100644 +index c2b81d0cf7c..9ff021fe11a 100644 --- a/build/gulpfile.reh.js +++ b/build/gulpfile.reh.js -@@ -44,6 +44,8 @@ const BUILD_TARGETS = [ +@@ -42,6 +42,7 @@ const BUILD_TARGETS = [ + { platform: 'darwin', arch: 'x64' }, + { platform: 'darwin', arch: 'arm64' }, { platform: 'linux', arch: 'x64' }, ++ { platform: 'linux', arch: 'ppc64le' }, { platform: 'linux', arch: 'armhf' }, { platform: 'linux', arch: 'arm64' }, -+ { platform: 'linux', arch: 'ppc64le' }, -+ { platform: 'linux', arch: 'riscv64' }, { platform: 'alpine', arch: 'arm64' }, - // legacy: we use to ship only one alpine so it was put in the arch, but now we ship - // multiple alpine images and moved to a better model (alpine as the platform) -@@ -210,6 +212,14 @@ function nodejs(platform, arch) { - .pipe(rename('node.exe')); - case 'darwin': - 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' ? - fetchGithub(product.nodejsRepository, { version: `${nodeVersion}-${internalNodeVersion}`, name: `node-v${nodeVersion}${glibcPrefix}-${platform}-${arch}.tar.gz`, checksumSha256 }) : - fetchUrls(`/dist/v${nodeVersion}/node-v${nodeVersion}-${platform}-${arch}.tar.gz`, { base: 'https://nodejs.org', checksumSha256 }) diff --git a/build/gulpfile.scan.js b/build/gulpfile.scan.js -index 6f8144b0954..8a8195e9b66 100644 +index 6f8144b0954..4479ae7dcb0 100644 --- a/build/gulpfile.scan.js +++ b/build/gulpfile.scan.js -@@ -24,6 +24,8 @@ const BUILD_TARGETS = [ +@@ -24,6 +24,7 @@ const BUILD_TARGETS = [ { platform: 'linux', arch: 'x64' }, { platform: 'linux', arch: 'armhf' }, { platform: 'linux', arch: 'arm64' }, + { platform: 'linux', arch: 'ppc64le' }, -+ { platform: 'linux', arch: 'riscv64' }, ]; BUILD_TARGETS.forEach(buildTarget => { diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js -index e1507e0424f..80ed8d91a41 100644 +index 3b1aeafd080..d0c2e685c16 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js -@@ -429,6 +429,8 @@ const BUILD_TARGETS = [ +@@ -432,6 +432,7 @@ const BUILD_TARGETS = [ { platform: 'linux', arch: 'x64' }, { platform: 'linux', arch: 'armhf' }, { platform: 'linux', arch: 'arm64' }, + { platform: 'linux', arch: 'ppc64le' }, -+ { platform: 'linux', arch: 'riscv64' }, ]; BUILD_TARGETS.forEach(buildTarget => { const dashed = (str) => (str ? `-${str}` : ``); diff --git a/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js -index 8c2b62f7b2a..2ddc1226f49 100644 +index 8c2b62f7b2a..e7491531bc1 100644 --- a/build/gulpfile.vscode.linux.js +++ b/build/gulpfile.vscode.linux.js @@ -28,7 +28,7 @@ const linuxPackageRevision = Math.floor(new Date().getTime() / 1000); @@ -118,7 +89,7 @@ index 8c2b62f7b2a..2ddc1226f49 100644 */ 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]; } function prepareDebPackage(arch) { @@ -127,41 +98,37 @@ index 8c2b62f7b2a..2ddc1226f49 100644 */ 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]; } /** -@@ -295,6 +295,8 @@ const BUILD_TARGETS = [ +@@ -295,6 +295,7 @@ const BUILD_TARGETS = [ { arch: 'x64' }, { arch: 'armhf' }, { arch: 'arm64' }, + { arch: 'ppc64le' }, -+ { arch: 'riscv64' }, ]; BUILD_TARGETS.forEach(({ arch }) => { diff --git a/build/linux/debian/calculate-deps.js b/build/linux/debian/calculate-deps.js -index bbcb6bfc3de..d00158f3de4 100644 +index bbcb6bfc3de..1ef9e7930b5 100644 --- a/build/linux/debian/calculate-deps.js +++ b/build/linux/debian/calculate-deps.js -@@ -49,6 +49,12 @@ function calculatePackageDeps(binaryPath, arch, chromiumSysroot, vscodeSysroot) +@@ -49,6 +49,9 @@ function calculatePackageDeps(binaryPath, arch, chromiumSysroot, vscodeSysroot) case 'arm64': cmd.push(`-l${chromiumSysroot}/usr/lib/aarch64-linux-gnu`, `-l${chromiumSysroot}/lib/aarch64-linux-gnu`, `-l${vscodeSysroot}/usr/lib/aarch64-linux-gnu`, `-l${vscodeSysroot}/lib/aarch64-linux-gnu`); 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; } cmd.push(`-l${chromiumSysroot}/usr/lib`); cmd.push(`-L${vscodeSysroot}/debian/libxkbfile1/DEBIAN/shlibs`); diff --git a/build/linux/debian/calculate-deps.ts b/build/linux/debian/calculate-deps.ts -index 92f8065f262..b86b4dba2b8 100644 +index 92f8065f262..1f895101627 100644 --- a/build/linux/debian/calculate-deps.ts +++ b/build/linux/debian/calculate-deps.ts -@@ -59,6 +59,18 @@ function calculatePackageDeps(binaryPath: string, arch: DebianArchString, chromi +@@ -59,6 +59,12 @@ function calculatePackageDeps(binaryPath: string, arch: DebianArchString, chromi `-l${vscodeSysroot}/usr/lib/aarch64-linux-gnu`, `-l${vscodeSysroot}/lib/aarch64-linux-gnu`); break; @@ -170,198 +137,12 @@ index 92f8065f262..b86b4dba2b8 100644 + `-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; } cmd.push(`-l${chromiumSysroot}/usr/lib`); cmd.push(`-L${vscodeSysroot}/debian/libxkbfile1/DEBIAN/shlibs`); -diff --git a/build/linux/debian/dep-lists.js b/build/linux/debian/dep-lists.js -index bdb265b6fec..4695f335416 100644 ---- a/build/linux/debian/dep-lists.js -+++ b/build/linux/debian/dep-lists.js -@@ -140,6 +140,85 @@ exports.referenceGeneratedDepsByArch = { - 'libxkbfile1 (>= 1:1.1.0)', - 'libxrandr2', - 'xdg-utils (>= 1.0.2)' -+ ], -+ 'ppc64el': [ -+ 'ca-certificates', -+ '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.9.14)', -+ 'libdrm2 (>= 2.4.75)', -+ 'libexpat1 (>= 2.1~beta3)', -+ 'libgbm1 (>= 17.1.0~rc2)', -+ 'libglib2.0-0 (>= 2.37.3)', -+ 'libgssapi-krb5-2 (>= 1.17)', -+ 'libgtk-3-0 (>= 3.9.10)', -+ 'libgtk-3-0 (>= 3.9.10) | libgtk-4-1', -+ 'libkrb5-3 (>= 1.6.dfsg.2)', -+ 'libnspr4 (>= 2:4.9-2~)', -+ 'libnss3 (>= 2:3.30)', -+ 'libnss3 (>= 3.26)', -+ 'libpango-1.0-0 (>= 1.14.0)', -+ '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.5.0)', -+ 'libxkbfile1 (>= 1:1.1.0)', -+ '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)' - ] - }; - //# sourceMappingURL=dep-lists.js.map -\ No newline at end of file -diff --git a/build/linux/debian/dep-lists.ts b/build/linux/debian/dep-lists.ts -index 3d6c2eba6e9..b8987ea7579 100644 ---- a/build/linux/debian/dep-lists.ts -+++ b/build/linux/debian/dep-lists.ts -@@ -140,5 +140,84 @@ export const referenceGeneratedDepsByArch = { - 'libxkbfile1 (>= 1:1.1.0)', - 'libxrandr2', - 'xdg-utils (>= 1.0.2)' -+ ], -+ 'ppc64el': [ -+ 'ca-certificates', -+ '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.9.14)', -+ 'libdrm2 (>= 2.4.75)', -+ 'libexpat1 (>= 2.1~beta3)', -+ 'libgbm1 (>= 17.1.0~rc2)', -+ 'libglib2.0-0 (>= 2.37.3)', -+ 'libgssapi-krb5-2 (>= 1.17)', -+ 'libgtk-3-0 (>= 3.9.10)', -+ 'libgtk-3-0 (>= 3.9.10) | libgtk-4-1', -+ 'libkrb5-3 (>= 1.6.dfsg.2)', -+ 'libnspr4 (>= 2:4.9-2~)', -+ 'libnss3 (>= 2:3.30)', -+ 'libnss3 (>= 3.26)', -+ 'libpango-1.0-0 (>= 1.14.0)', -+ '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.5.0)', -+ 'libxkbfile1 (>= 1:1.1.0)', -+ '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 feca7d3fa9d..f075ebcba75 100644 +index feca7d3fa9d..37cc17b0ac9 100644 --- a/build/linux/debian/install-sysroot.js +++ b/build/linux/debian/install-sysroot.js @@ -70,7 +70,10 @@ async function fetchUrl(options, retries = 10, retryDelay = 1000) { @@ -385,23 +166,19 @@ index feca7d3fa9d..f075ebcba75 100644 } console.log(`Found asset ${options.assetName} @ ${asset.url}.`); const assetResponse = await fetch(asset.url, { -@@ -134,6 +137,14 @@ async function getVSCodeSysroot(arch) { +@@ -134,6 +137,10 @@ async function getVSCodeSysroot(arch) { expectedName = `arm-rpi-linux-gnueabihf${prefix}.tar.gz`; triple = 'arm-rpi-linux-gnueabihf'; 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; } console.log(`Fetching ${expectedName} for ${triple}`); const checksumSha256 = getVSCodeSysrootChecksum(expectedName); diff --git a/build/linux/debian/install-sysroot.ts b/build/linux/debian/install-sysroot.ts -index aa417dcc722..02b1cc4e057 100644 +index aa417dcc722..60c46a95e73 100644 --- a/build/linux/debian/install-sysroot.ts +++ b/build/linux/debian/install-sysroot.ts @@ -82,7 +82,10 @@ async function fetchUrl(options: IFetchOptions, retries = 10, retryDelay = 1000) @@ -425,23 +202,19 @@ index aa417dcc722..02b1cc4e057 100644 } console.log(`Found asset ${options.assetName} @ ${asset.url}.`); const assetResponse = await fetch(asset.url, { -@@ -151,6 +154,14 @@ export async function getVSCodeSysroot(arch: DebianArchString): Promise +@@ -151,6 +154,10 @@ export async function getVSCodeSysroot(arch: DebianArchString): Promise expectedName = `arm-rpi-linux-gnueabihf${prefix}.tar.gz`; triple = 'arm-rpi-linux-gnueabihf'; break; + case 'ppc64el': + 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; } console.log(`Fetching ${expectedName} for ${triple}`); const checksumSha256 = getVSCodeSysrootChecksum(expectedName); diff --git a/build/linux/debian/types.js b/build/linux/debian/types.js -index ce21d50e1a9..cadefc2aa4c 100644 +index ce21d50e1a9..2c56b9c260a 100644 --- a/build/linux/debian/types.js +++ b/build/linux/debian/types.js @@ -6,6 +6,6 @@ @@ -449,12 +222,12 @@ index ce21d50e1a9..cadefc2aa4c 100644 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); } //# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/build/linux/debian/types.ts b/build/linux/debian/types.ts -index e97485ef128..24fe452f7fe 100644 +index e97485ef128..43f24347151 100644 --- a/build/linux/debian/types.ts +++ b/build/linux/debian/types.ts @@ -3,8 +3,8 @@ @@ -462,11 +235,11 @@ index e97485ef128..24fe452f7fe 100644 *--------------------------------------------------------------------------------------------*/ -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/types.js b/build/linux/rpm/types.js index a20b9c2fe02..99a8cff7856 100644 @@ -477,12 +250,12 @@ index a20b9c2fe02..99a8cff7856 100644 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); } //# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/build/linux/rpm/types.ts b/build/linux/rpm/types.ts -index c6a01da1cf5..d94537e0c49 100644 +index c6a01da1cf5..3f3c3f5f800 100644 --- a/build/linux/rpm/types.ts +++ b/build/linux/rpm/types.ts @@ -3,8 +3,8 @@ @@ -490,92 +263,83 @@ index c6a01da1cf5..d94537e0c49 100644 *--------------------------------------------------------------------------------------------*/ -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 4bec13d6e86..3debda1224a 100644 +index 4bec13d6e86..823d8f59046 100644 --- a/cli/src/update_service.rs +++ b/cli/src/update_service.rs -@@ -214,6 +214,9 @@ pub enum Platform { +@@ -214,6 +214,8 @@ pub enum Platform { LinuxARM64Legacy, LinuxARM32, LinuxARM32Legacy, + LinuxPPC64LE, + LinuxPPC64LELegacy, -+ LinuxRISCV64, DarwinX64, DarwinARM64, WindowsX64, -@@ -227,6 +230,8 @@ impl Platform { +@@ -227,6 +229,7 @@ impl Platform { Platform::LinuxX64 => Some("linux-x64".to_owned()), Platform::LinuxARM64 => Some("linux-arm64".to_owned()), 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()), Platform::DarwinARM64 => Some("darwin-arm64".to_owned()), Platform::WindowsX64 => Some("win32-x64-archive".to_owned()), -@@ -245,6 +250,9 @@ impl Platform { +@@ -245,6 +248,8 @@ impl Platform { Platform::LinuxARM64Legacy => "server-linux-legacy-arm64", Platform::LinuxARM32 => "server-linux-armhf", 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", Platform::DarwinARM64 => "server-darwin-arm64", Platform::WindowsX64 => "server-win32-x64", -@@ -264,6 +272,9 @@ impl Platform { +@@ -264,6 +269,8 @@ impl Platform { Platform::LinuxARM64Legacy => "cli-linux-arm64", Platform::LinuxARM32 => "cli-linux-armhf", 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", Platform::DarwinARM64 => "cli-darwin-arm64", Platform::WindowsARM64 => "cli-win32-arm64", -@@ -296,6 +307,10 @@ impl Platform { +@@ -296,6 +303,8 @@ impl Platform { Some(Platform::LinuxARM32) } else if cfg!(all(target_os = "linux", target_arch = "aarch64")) { 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")) { Some(Platform::DarwinX64) } else if cfg!(all(target_os = "macos", target_arch = "aarch64")) { -@@ -323,6 +338,9 @@ impl fmt::Display for Platform { +@@ -323,6 +332,8 @@ impl fmt::Display for Platform { Platform::LinuxARM64Legacy => "LinuxARM64Legacy", Platform::LinuxARM32 => "LinuxARM32", Platform::LinuxARM32Legacy => "LinuxARM32Legacy", + Platform::LinuxPPC64LE => "LinuxPPC64LE", + Platform::LinuxPPC64LELegacy => "LinuxPPC64LELegacy", -+ Platform::LinuxRISCV64 => "LinuxRISCV64", Platform::DarwinX64 => "DarwinX64", Platform::DarwinARM64 => "DarwinARM64", Platform::WindowsX64 => "WindowsX64", diff --git a/cli/src/util/prereqs.rs b/cli/src/util/prereqs.rs -index 5d4953acbb2..f22ff60e391 100644 +index 5d4953acbb2..5a960336907 100644 --- a/cli/src/util/prereqs.rs +++ b/cli/src/util/prereqs.rs -@@ -74,6 +74,10 @@ impl PreReqChecker { +@@ -74,6 +74,8 @@ impl PreReqChecker { Platform::LinuxX64 } else if cfg!(target_arch = "arm") { Platform::LinuxARM32 + } else if cfg!(target_arch = "ppc64le") { + Platform::LinuxPPC64LE -+ } else if cfg!(target_arch = "riscv64") { -+ Platform::LinuxRISCV64 } else { Platform::LinuxARM64 }); -@@ -83,6 +87,8 @@ impl PreReqChecker { +@@ -83,6 +85,8 @@ impl PreReqChecker { Platform::LinuxX64Legacy } else if cfg!(target_arch = "arm") { Platform::LinuxARM32Legacy @@ -585,63 +349,56 @@ index 5d4953acbb2..f22ff60e391 100644 Platform::LinuxARM64Legacy }); diff --git a/resources/server/bin/helpers/check-requirements-linux.sh b/resources/server/bin/helpers/check-requirements-linux.sh -index 079557869e3..c057746b870 100644 +index 079557869e3..1504694cd7e 100644 --- a/resources/server/bin/helpers/check-requirements-linux.sh +++ b/resources/server/bin/helpers/check-requirements-linux.sh -@@ -50,6 +50,8 @@ case $ARCH in +@@ -50,6 +50,7 @@ case $ARCH in LDCONFIG_ARCH="AArch64" fi ;; + ppc64el) LDCONFIG_ARCH="64bit";; -+ riscv64) LDCONFIG_ARCH="RISC-V";; esac if [ "$OS_ID" != "alpine" ]; then diff --git a/src/vs/platform/extensionManagement/common/extensionManagement.ts b/src/vs/platform/extensionManagement/common/extensionManagement.ts -index 665ea2e18df..d23ba6c8a76 100644 +index 183f2582871..bfbd706df7a 100644 --- a/src/vs/platform/extensionManagement/common/extensionManagement.ts +++ b/src/vs/platform/extensionManagement/common/extensionManagement.ts -@@ -33,6 +33,8 @@ export function TargetPlatformToString(targetPlatform: TargetPlatform) { +@@ -39,6 +39,7 @@ export function TargetPlatformToString(targetPlatform: TargetPlatform) { case TargetPlatform.LINUX_X64: return 'Linux 64 bit'; case TargetPlatform.LINUX_ARM64: return 'Linux ARM 64'; case TargetPlatform.LINUX_ARMHF: return 'Linux ARM'; -+ case TargetPlatform.LINUX_PPC64LE: return 'Linux PowerPC64'; -+ case TargetPlatform.LINUX_RISCV64: return 'Linux RISC-V 64'; ++ case TargetPlatform.LINUX_PPC64LE: return 'Linux PowerPC'; case TargetPlatform.ALPINE_X64: return 'Alpine Linux 64 bit'; case TargetPlatform.ALPINE_ARM64: return 'Alpine ARM 64'; -@@ -56,6 +58,8 @@ export function toTargetPlatform(targetPlatform: string): TargetPlatform { +@@ -62,6 +63,7 @@ export function toTargetPlatform(targetPlatform: string): TargetPlatform { case TargetPlatform.LINUX_X64: return TargetPlatform.LINUX_X64; case TargetPlatform.LINUX_ARM64: return TargetPlatform.LINUX_ARM64; case TargetPlatform.LINUX_ARMHF: return TargetPlatform.LINUX_ARMHF; + case TargetPlatform.LINUX_PPC64LE: return TargetPlatform.LINUX_PPC64LE; -+ case TargetPlatform.LINUX_RISCV64: return TargetPlatform.LINUX_RISCV64; case TargetPlatform.ALPINE_X64: return TargetPlatform.ALPINE_X64; case TargetPlatform.ALPINE_ARM64: return TargetPlatform.ALPINE_ARM64; -@@ -91,6 +95,12 @@ export function getTargetPlatform(platform: Platform | 'alpine', arch: string | +@@ -97,6 +99,9 @@ export function getTargetPlatform(platform: Platform | 'alpine', arch: string | if (arch === 'arm') { return TargetPlatform.LINUX_ARMHF; } + if (arch === 'ppc64le') { + return TargetPlatform.LINUX_PPC64LE; -+ } -+ if (arch === 'riscv64') { -+ return TargetPlatform.LINUX_RISCV64; + } return TargetPlatform.UNKNOWN; case 'alpine': diff --git a/src/vs/platform/extensions/common/extensions.ts b/src/vs/platform/extensions/common/extensions.ts -index cfe5313b905..fe14a21f0e8 100644 +index cfe5313b905..24622a81f02 100644 --- a/src/vs/platform/extensions/common/extensions.ts +++ b/src/vs/platform/extensions/common/extensions.ts -@@ -304,6 +304,8 @@ export const enum TargetPlatform { +@@ -304,6 +304,7 @@ export const enum TargetPlatform { LINUX_X64 = 'linux-x64', LINUX_ARM64 = 'linux-arm64', LINUX_ARMHF = 'linux-armhf', + LINUX_PPC64LE = 'linux-ppc64le', -+ LINUX_RISCV64 = 'linux-riscv64', ALPINE_X64 = 'alpine-x64', ALPINE_ARM64 = 'alpine-arm64', diff --git a/patches/riscv64-support.patch b/patches/riscv64-support.patch new file mode 100644 index 00000000000..2d4eda8484c --- /dev/null +++ b/patches/riscv64-support.patch @@ -0,0 +1,333 @@ +diff --git a/build/azure-pipelines/linux/setup-env.sh b/build/azure-pipelines/linux/setup-env.sh +index 883f7d0abd5..3064f783d8c 100755 +--- a/build/azure-pipelines/linux/setup-env.sh ++++ b/build/azure-pipelines/linux/setup-env.sh +@@ -7,6 +7,10 @@ if [ "$SYSROOT_ARCH" == "x64" ]; then + SYSROOT_ARCH="amd64" + fi + ++if [ "$npm_config_arch" == "riscv64" ]; then ++ exit 0 ++fi ++ + export VSCODE_SYSROOT_DIR=$PWD/.build/sysroots + SYSROOT_ARCH="$SYSROOT_ARCH" node -e '(async () => { const { getVSCodeSysroot } = require("./build/linux/debian/install-sysroot.js"); await getVSCodeSysroot(process.env["SYSROOT_ARCH"]); })()' + +diff --git a/build/gulpfile.reh.js b/build/gulpfile.reh.js +index 9ff021fe11a..1e6309ac7bf 100644 +--- a/build/gulpfile.reh.js ++++ b/build/gulpfile.reh.js +@@ -45,6 +45,7 @@ const BUILD_TARGETS = [ + { platform: 'linux', arch: 'ppc64le' }, + { platform: 'linux', arch: 'armhf' }, + { platform: 'linux', arch: 'arm64' }, ++ { platform: 'linux', arch: 'riscv64' }, + { platform: 'alpine', arch: 'arm64' }, + // legacy: we use to ship only one alpine so it was put in the arch, but now we ship + // multiple alpine images and moved to a better model (alpine as the platform) +@@ -211,6 +212,14 @@ function nodejs(platform, arch) { + .pipe(rename('node.exe')); + case 'darwin': + 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' ? + fetchGithub(product.nodejsRepository, { version: `${nodeVersion}-${internalNodeVersion}`, name: `node-v${nodeVersion}${glibcPrefix}-${platform}-${arch}.tar.gz`, checksumSha256 }) : + fetchUrls(`/dist/v${nodeVersion}/node-v${nodeVersion}-${platform}-${arch}.tar.gz`, { base: 'https://nodejs.org', checksumSha256 }) +diff --git a/build/gulpfile.scan.js b/build/gulpfile.scan.js +index 4479ae7dcb0..8a8195e9b66 100644 +--- a/build/gulpfile.scan.js ++++ b/build/gulpfile.scan.js +@@ -25,6 +25,7 @@ const BUILD_TARGETS = [ + { platform: 'linux', arch: 'armhf' }, + { platform: 'linux', arch: 'arm64' }, + { platform: 'linux', arch: 'ppc64le' }, ++ { platform: 'linux', arch: 'riscv64' }, + ]; + + BUILD_TARGETS.forEach(buildTarget => { +diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js +index d0c2e685c16..a5ddc5bd901 100644 +--- a/build/gulpfile.vscode.js ++++ b/build/gulpfile.vscode.js +@@ -433,6 +433,7 @@ const BUILD_TARGETS = [ + { platform: 'linux', arch: 'armhf' }, + { platform: 'linux', arch: 'arm64' }, + { platform: 'linux', arch: 'ppc64le' }, ++ { platform: 'linux', arch: 'riscv64' }, + ]; + BUILD_TARGETS.forEach(buildTarget => { + const dashed = (str) => (str ? `-${str}` : ``); +diff --git a/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js +index e7491531bc1..2ddc1226f49 100644 +--- a/build/gulpfile.vscode.linux.js ++++ b/build/gulpfile.vscode.linux.js +@@ -28,7 +28,7 @@ const linuxPackageRevision = Math.floor(new Date().getTime() / 1000); + * @param {string} arch + */ + 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]; + } + + function prepareDebPackage(arch) { +@@ -134,7 +134,7 @@ function getRpmBuildPath(rpmArch) { + * @param {string} arch + */ + 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]; + } + + /** +@@ -296,6 +296,7 @@ const BUILD_TARGETS = [ + { arch: 'armhf' }, + { arch: 'arm64' }, + { arch: 'ppc64le' }, ++ { arch: 'riscv64' }, + ]; + + BUILD_TARGETS.forEach(({ arch }) => { +diff --git a/build/linux/debian/calculate-deps.js b/build/linux/debian/calculate-deps.js +index 1ef9e7930b5..d00158f3de4 100644 +--- a/build/linux/debian/calculate-deps.js ++++ b/build/linux/debian/calculate-deps.js +@@ -52,6 +52,9 @@ function calculatePackageDeps(binaryPath, arch, chromiumSysroot, vscodeSysroot) + 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; + } + cmd.push(`-l${chromiumSysroot}/usr/lib`); + cmd.push(`-L${vscodeSysroot}/debian/libxkbfile1/DEBIAN/shlibs`); +diff --git a/build/linux/debian/calculate-deps.ts b/build/linux/debian/calculate-deps.ts +index 1f895101627..b86b4dba2b8 100644 +--- a/build/linux/debian/calculate-deps.ts ++++ b/build/linux/debian/calculate-deps.ts +@@ -65,6 +65,12 @@ function calculatePackageDeps(binaryPath: string, arch: DebianArchString, chromi + `-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; + } + cmd.push(`-l${chromiumSysroot}/usr/lib`); + cmd.push(`-L${vscodeSysroot}/debian/libxkbfile1/DEBIAN/shlibs`); +diff --git a/build/linux/debian/install-sysroot.js b/build/linux/debian/install-sysroot.js +index 37cc17b0ac9..f075ebcba75 100644 +--- a/build/linux/debian/install-sysroot.js ++++ b/build/linux/debian/install-sysroot.js +@@ -141,6 +141,10 @@ async function getVSCodeSysroot(arch) { + 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; + } + console.log(`Fetching ${expectedName} for ${triple}`); + const checksumSha256 = getVSCodeSysrootChecksum(expectedName); +diff --git a/build/linux/debian/install-sysroot.ts b/build/linux/debian/install-sysroot.ts +index 60c46a95e73..02b1cc4e057 100644 +--- a/build/linux/debian/install-sysroot.ts ++++ b/build/linux/debian/install-sysroot.ts +@@ -158,6 +158,10 @@ export async function getVSCodeSysroot(arch: DebianArchString): Promise + 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; + } + console.log(`Fetching ${expectedName} for ${triple}`); + const checksumSha256 = getVSCodeSysrootChecksum(expectedName); +diff --git a/build/linux/debian/types.js b/build/linux/debian/types.js +index 2c56b9c260a..cadefc2aa4c 100644 +--- a/build/linux/debian/types.js ++++ b/build/linux/debian/types.js +@@ -6,6 +6,6 @@ + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isDebianArchString = isDebianArchString; + function isDebianArchString(s) { +- return ['amd64', 'armhf', 'arm64', 'ppc64el'].includes(s); ++ return ['amd64', 'armhf', 'arm64', 'ppc64el', 'riscv64'].includes(s); + } + //# sourceMappingURL=types.js.map +\ No newline at end of file +diff --git a/build/linux/debian/types.ts b/build/linux/debian/types.ts +index 43f24347151..24fe452f7fe 100644 +--- a/build/linux/debian/types.ts ++++ b/build/linux/debian/types.ts +@@ -3,8 +3,8 @@ + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +-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 99a8cff7856..1da22ab6229 100644 +--- a/build/linux/rpm/types.js ++++ b/build/linux/rpm/types.js +@@ -6,6 +6,6 @@ + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isRpmArchString = isRpmArchString; + function isRpmArchString(s) { +- return ['x86_64', 'armv7hl', 'aarch64', 'ppc64le'].includes(s); ++ return ['x86_64', 'armv7hl', 'aarch64', 'ppc64le', 'riscv64'].includes(s); + } + //# sourceMappingURL=types.js.map +\ No newline at end of file +diff --git a/build/linux/rpm/types.ts b/build/linux/rpm/types.ts +index 3f3c3f5f800..d94537e0c49 100644 +--- a/build/linux/rpm/types.ts ++++ b/build/linux/rpm/types.ts +@@ -3,8 +3,8 @@ + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +-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 823d8f59046..3debda1224a 100644 +--- a/cli/src/update_service.rs ++++ b/cli/src/update_service.rs +@@ -216,6 +216,7 @@ pub enum Platform { + LinuxARM32Legacy, + LinuxPPC64LE, + LinuxPPC64LELegacy, ++ LinuxRISCV64, + DarwinX64, + DarwinARM64, + WindowsX64, +@@ -230,6 +231,7 @@ impl Platform { + Platform::LinuxARM64 => Some("linux-arm64".to_owned()), + 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()), + Platform::DarwinARM64 => Some("darwin-arm64".to_owned()), + Platform::WindowsX64 => Some("win32-x64-archive".to_owned()), +@@ -250,6 +252,7 @@ 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", + Platform::DarwinARM64 => "server-darwin-arm64", + Platform::WindowsX64 => "server-win32-x64", +@@ -271,6 +274,7 @@ 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", + Platform::DarwinARM64 => "cli-darwin-arm64", + Platform::WindowsARM64 => "cli-win32-arm64", +@@ -305,6 +309,8 @@ 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")) { + Some(Platform::DarwinX64) + } else if cfg!(all(target_os = "macos", target_arch = "aarch64")) { +@@ -334,6 +340,7 @@ impl fmt::Display for Platform { + Platform::LinuxARM32Legacy => "LinuxARM32Legacy", + Platform::LinuxPPC64LE => "LinuxPPC64LE", + Platform::LinuxPPC64LELegacy => "LinuxPPC64LELegacy", ++ Platform::LinuxRISCV64 => "LinuxRISCV64", + Platform::DarwinX64 => "DarwinX64", + Platform::DarwinARM64 => "DarwinARM64", + Platform::WindowsX64 => "WindowsX64", +diff --git a/cli/src/util/prereqs.rs b/cli/src/util/prereqs.rs +index 5a960336907..f22ff60e391 100644 +--- a/cli/src/util/prereqs.rs ++++ b/cli/src/util/prereqs.rs +@@ -76,6 +76,8 @@ impl PreReqChecker { + Platform::LinuxARM32 + } else if cfg!(target_arch = "ppc64le") { + Platform::LinuxPPC64LE ++ } else if cfg!(target_arch = "riscv64") { ++ Platform::LinuxRISCV64 + } else { + Platform::LinuxARM64 + }); +diff --git a/resources/server/bin/helpers/check-requirements-linux.sh b/resources/server/bin/helpers/check-requirements-linux.sh +index 1504694cd7e..c057746b870 100644 +--- a/resources/server/bin/helpers/check-requirements-linux.sh ++++ b/resources/server/bin/helpers/check-requirements-linux.sh +@@ -51,6 +51,7 @@ case $ARCH in + fi + ;; + ppc64el) LDCONFIG_ARCH="64bit";; ++ riscv64) LDCONFIG_ARCH="RISC-V";; + esac + + if [ "$OS_ID" != "alpine" ]; then +diff --git a/src/vs/platform/extensionManagement/common/extensionManagement.ts b/src/vs/platform/extensionManagement/common/extensionManagement.ts +index bfbd706df7a..2e6614cad59 100644 +--- a/src/vs/platform/extensionManagement/common/extensionManagement.ts ++++ b/src/vs/platform/extensionManagement/common/extensionManagement.ts +@@ -40,6 +40,7 @@ export function TargetPlatformToString(targetPlatform: TargetPlatform) { + case TargetPlatform.LINUX_ARM64: return 'Linux ARM 64'; + case TargetPlatform.LINUX_ARMHF: return 'Linux ARM'; + case TargetPlatform.LINUX_PPC64LE: return 'Linux PowerPC'; ++ case TargetPlatform.LINUX_RISCV64: return 'Linux RISC-V 64'; + + case TargetPlatform.ALPINE_X64: return 'Alpine Linux 64 bit'; + case TargetPlatform.ALPINE_ARM64: return 'Alpine ARM 64'; +@@ -64,6 +65,7 @@ export function toTargetPlatform(targetPlatform: string): TargetPlatform { + case TargetPlatform.LINUX_ARM64: return TargetPlatform.LINUX_ARM64; + case TargetPlatform.LINUX_ARMHF: return TargetPlatform.LINUX_ARMHF; + case TargetPlatform.LINUX_PPC64LE: return TargetPlatform.LINUX_PPC64LE; ++ case TargetPlatform.LINUX_RISCV64: return TargetPlatform.LINUX_RISCV64; + + case TargetPlatform.ALPINE_X64: return TargetPlatform.ALPINE_X64; + case TargetPlatform.ALPINE_ARM64: return TargetPlatform.ALPINE_ARM64; +@@ -102,6 +104,9 @@ 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; + + case 'alpine': +diff --git a/src/vs/platform/extensions/common/extensions.ts b/src/vs/platform/extensions/common/extensions.ts +index 24622a81f02..fe14a21f0e8 100644 +--- a/src/vs/platform/extensions/common/extensions.ts ++++ b/src/vs/platform/extensions/common/extensions.ts +@@ -305,6 +305,7 @@ export const enum TargetPlatform { + LINUX_ARM64 = 'linux-arm64', + LINUX_ARMHF = 'linux-armhf', + LINUX_PPC64LE = 'linux-ppc64le', ++ LINUX_RISCV64 = 'linux-riscv64', + + ALPINE_X64 = 'alpine-x64', + ALPINE_ARM64 = 'alpine-arm64',