ppc64le-and-riscv64-support.patch 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  1. diff --git a/build/azure-pipelines/linux/setup-env.sh b/build/azure-pipelines/linux/setup-env.sh
  2. index e42a6b12b1f..e17f0e2bb17 100755
  3. --- a/build/azure-pipelines/linux/setup-env.sh
  4. +++ b/build/azure-pipelines/linux/setup-env.sh
  5. @@ -7,6 +7,10 @@ if [ "$SYSROOT_ARCH" == "x64" ]; then
  6. SYSROOT_ARCH="amd64"
  7. fi
  8. +if [ "$npm_config_arch" == "riscv64" ]; then
  9. + exit 0
  10. +fi
  11. +
  12. export VSCODE_SYSROOT_DIR=$PWD/.build/sysroots
  13. SYSROOT_ARCH="$SYSROOT_ARCH" node -e '(async () => { const { getVSCodeSysroot } = require("./build/linux/debian/install-sysroot.js"); await getVSCodeSysroot(process.env["SYSROOT_ARCH"]); })()'
  14. @@ -67,4 +71,19 @@ elif [ "$npm_config_arch" == "arm" ]; then
  15. export VSCODE_REMOTE_CXXFLAGS="--sysroot=$VSCODE_SYSROOT_DIR/arm-rpi-linux-gnueabihf/arm-rpi-linux-gnueabihf/sysroot"
  16. 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"
  17. fi
  18. +elif [ "$npm_config_arch" == "ppc64" ]; then
  19. + if [ "$(echo "$@" | grep -c -- "--only-remote")" -eq 0 ]; then
  20. + # Set compiler toolchain for client native modules
  21. + export CC=$VSCODE_SYSROOT_DIR/powerpc64le-linux-gnu/bin/powerpc64le-linux-gnu-gcc
  22. + export CXX=$VSCODE_SYSROOT_DIR/powerpc64le-linux-gnu/bin/powerpc64le-linux-gnu-g++
  23. + export CXXFLAGS="--sysroot=$VSCODE_SYSROOT_DIR/powerpc64le-linux-gnu/powerpc64le-linux-gnu/sysroot"
  24. + 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"
  25. +
  26. + # Set compiler toolchain for remote server
  27. + export VSCODE_REMOTE_CC=$VSCODE_SYSROOT_DIR/powerpc64le-linux-gnu/bin/powerpc64le-linux-gnu-gcc
  28. + export VSCODE_REMOTE_CXX=$VSCODE_SYSROOT_DIR/powerpc64le-linux-gnu/bin/powerpc64le-linux-gnu-g++
  29. + export VSCODE_REMOTE_CXXFLAGS="--sysroot=$VSCODE_SYSROOT_DIR/powerpc64le-linux-gnu/powerpc64le-linux-gnu/sysroot"
  30. + 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"
  31. + fi
  32. +
  33. fi
  34. diff --git a/build/azure-pipelines/linux/verify-glibc-requirements.sh b/build/azure-pipelines/linux/verify-glibc-requirements.sh
  35. index f07c0ba..1cb257b 100755
  36. --- a/build/azure-pipelines/linux/verify-glibc-requirements.sh
  37. +++ b/build/azure-pipelines/linux/verify-glibc-requirements.sh
  38. @@ -7,6 +7,8 @@ if [ "$VSCODE_ARCH" == "arm64" ]; then
  39. TRIPLE="aarch64-linux-gnu"
  40. elif [ "$VSCODE_ARCH" == "armhf" ]; then
  41. TRIPLE="arm-rpi-linux-gnueabihf"
  42. +elif [ "$VSCODE_ARCH" == "ppc64le" ]; then
  43. + TRIPLE="powerpc64le-linux-gnu"
  44. fi
  45. # Get all files with .node extension from remote/node_modules folder
  46. diff --git a/build/checksums/vscode-sysroot.txt b/build/checksums/vscode-sysroot.txt
  47. index 0b5f38c60ce..70770276503 100644
  48. --- a/build/checksums/vscode-sysroot.txt
  49. +++ b/build/checksums/vscode-sysroot.txt
  50. @@ -4,3 +4,4 @@
  51. 7aea163f7fad8cc50000c86b5108be880121d35e2f55d016ef8c96bbe54129eb arm-rpi-linux-gnueabihf-glibc-2.28.tar.gz
  52. 5aae21115f1d284c3cdf32c83db15771b59bc80793f1423032abf5a823c0d658 x86_64-linux-gnu-glibc-2.17.tar.gz
  53. dbb927408393041664a020661f2641c9785741be3d29b050b9dac58980967784 x86_64-linux-gnu-glibc-2.28.tar.gz
  54. +fa8176d27be18bb0eeb7f55b0fa22255050b430ef68c29136599f02976eb0b1b powerpc64le-linux-gnu-glibc-2.28.tar.gz
  55. diff --git a/build/gulpfile.reh.js b/build/gulpfile.reh.js
  56. index c2b81d0cf7c..fa5de83a076 100644
  57. --- a/build/gulpfile.reh.js
  58. +++ b/build/gulpfile.reh.js
  59. @@ -44,6 +44,8 @@ const BUILD_TARGETS = [
  60. { platform: 'linux', arch: 'x64' },
  61. { platform: 'linux', arch: 'armhf' },
  62. { platform: 'linux', arch: 'arm64' },
  63. + { platform: 'linux', arch: 'ppc64le' },
  64. + { platform: 'linux', arch: 'riscv64' },
  65. { platform: 'alpine', arch: 'arm64' },
  66. // legacy: we use to ship only one alpine so it was put in the arch, but now we ship
  67. // multiple alpine images and moved to a better model (alpine as the platform)
  68. @@ -210,6 +212,14 @@ function nodejs(platform, arch) {
  69. .pipe(rename('node.exe'));
  70. case 'darwin':
  71. case 'linux':
  72. + if (arch === 'riscv64') {
  73. + return fetchUrls(`/download/release/v${nodeVersion}/node-v${nodeVersion}-${platform}-${arch}.tar.gz`,
  74. + { base: 'https://unofficial-builds.nodejs.org', checksumSha256 }).pipe(flatmap(stream => stream.pipe(gunzip()).pipe
  75. + (untar())))
  76. + .pipe(filter('**/node'))
  77. + .pipe(util.setExecutableBit('**'))
  78. + .pipe(rename('node'));
  79. + }
  80. return (product.nodejsRepository !== 'https://nodejs.org' ?
  81. fetchGithub(product.nodejsRepository, { version: `${nodeVersion}-${internalNodeVersion}`, name: `node-v${nodeVersion}${glibcPrefix}-${platform}-${arch}.tar.gz`, checksumSha256 }) :
  82. fetchUrls(`/dist/v${nodeVersion}/node-v${nodeVersion}-${platform}-${arch}.tar.gz`, { base: 'https://nodejs.org', checksumSha256 })
  83. diff --git a/build/gulpfile.scan.js b/build/gulpfile.scan.js
  84. index 6f8144b0954..8a8195e9b66 100644
  85. --- a/build/gulpfile.scan.js
  86. +++ b/build/gulpfile.scan.js
  87. @@ -24,6 +24,8 @@ const BUILD_TARGETS = [
  88. { platform: 'linux', arch: 'x64' },
  89. { platform: 'linux', arch: 'armhf' },
  90. { platform: 'linux', arch: 'arm64' },
  91. + { platform: 'linux', arch: 'ppc64le' },
  92. + { platform: 'linux', arch: 'riscv64' },
  93. ];
  94. BUILD_TARGETS.forEach(buildTarget => {
  95. diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js
  96. index e1507e0424f..80ed8d91a41 100644
  97. --- a/build/gulpfile.vscode.js
  98. +++ b/build/gulpfile.vscode.js
  99. @@ -429,6 +429,8 @@ const BUILD_TARGETS = [
  100. { platform: 'linux', arch: 'x64' },
  101. { platform: 'linux', arch: 'armhf' },
  102. { platform: 'linux', arch: 'arm64' },
  103. + { platform: 'linux', arch: 'ppc64le' },
  104. + { platform: 'linux', arch: 'riscv64' },
  105. ];
  106. BUILD_TARGETS.forEach(buildTarget => {
  107. const dashed = (str) => (str ? `-${str}` : ``);
  108. diff --git a/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js
  109. index 8c2b62f7b2a..a58ec3d7725 100644
  110. --- a/build/gulpfile.vscode.linux.js
  111. +++ b/build/gulpfile.vscode.linux.js
  112. @@ -28,7 +28,7 @@ const linuxPackageRevision = Math.floor(new Date().getTime() / 1000);
  113. * @param {string} arch
  114. */
  115. function getDebPackageArch(arch) {
  116. - return { x64: 'amd64', armhf: 'armhf', arm64: 'arm64' }[arch];
  117. + return { x64: 'amd64', armhf: 'armhf', arm64: 'arm64', ppc64le: 'ppc64le', riscv64: 'riscv64' }[arch];
  118. }
  119. function prepareDebPackage(arch) {
  120. @@ -134,7 +134,7 @@ function getRpmBuildPath(rpmArch) {
  121. * @param {string} arch
  122. */
  123. function getRpmPackageArch(arch) {
  124. - return { x64: 'x86_64', armhf: 'armv7hl', arm64: 'aarch64' }[arch];
  125. + return { x64: 'x86_64', armhf: 'armv7hl', arm64: 'aarch64', ppc64le: 'ppc64le', riscv64: 'riscv64' }[arch];
  126. }
  127. /**
  128. @@ -295,6 +295,8 @@ const BUILD_TARGETS = [
  129. { arch: 'x64' },
  130. { arch: 'armhf' },
  131. { arch: 'arm64' },
  132. + { arch: 'ppc64le' },
  133. + { arch: 'riscv64' },
  134. ];
  135. BUILD_TARGETS.forEach(({ arch }) => {
  136. diff --git a/build/linux/debian/calculate-deps.ts b/build/linux/debian/calculate-deps.ts
  137. index 92f8065f262..4d930b269aa 100644
  138. --- a/build/linux/debian/calculate-deps.ts
  139. +++ b/build/linux/debian/calculate-deps.ts
  140. @@ -59,6 +59,18 @@ function calculatePackageDeps(binaryPath: string, arch: DebianArchString, chromi
  141. `-l${vscodeSysroot}/usr/lib/aarch64-linux-gnu`,
  142. `-l${vscodeSysroot}/lib/aarch64-linux-gnu`);
  143. break;
  144. + case 'ppc64le':
  145. + cmd.push(`-l${chromiumSysroot}/usr/lib/powerpc64le-linux-gnu`,
  146. + `-l${chromiumSysroot}/lib/powerpc64le-linux-gnu`,
  147. + `-l${vscodeSysroot}/usr/lib/powerpc64le-linux-gnu`,
  148. + `-l${vscodeSysroot}/lib/powerpc64le-linux-gnu`);
  149. + break;
  150. + case 'riscv64':
  151. + cmd.push(`-l${chromiumSysroot}/usr/lib/riscv64-linux-gnu`,
  152. + `-l${chromiumSysroot}/lib/riscv64-linux-gnu`,
  153. + `-l${vscodeSysroot}/usr/lib/riscv64-linux-gnu`,
  154. + `-l${vscodeSysroot}/lib/riscv64-linux-gnu`);
  155. + break;
  156. }
  157. cmd.push(`-l${chromiumSysroot}/usr/lib`);
  158. cmd.push(`-L${vscodeSysroot}/debian/libxkbfile1/DEBIAN/shlibs`);
  159. diff --git a/build/linux/debian/dep-lists.ts b/build/linux/debian/dep-lists.ts
  160. index 3d6c2eba6e9..0856a0514bd 100644
  161. --- a/build/linux/debian/dep-lists.ts
  162. +++ b/build/linux/debian/dep-lists.ts
  163. @@ -140,5 +140,84 @@ export const referenceGeneratedDepsByArch = {
  164. 'libxkbfile1 (>= 1:1.1.0)',
  165. 'libxrandr2',
  166. 'xdg-utils (>= 1.0.2)'
  167. - ]
  168. + ],
  169. + 'ppc64le': [
  170. + 'ca-certificates',
  171. + 'libasound2 (>= 1.0.17)',
  172. + 'libatk-bridge2.0-0 (>= 2.5.3)',
  173. + 'libatk1.0-0 (>= 2.2.0)',
  174. + 'libatspi2.0-0 (>= 2.9.90)',
  175. + 'libc6 (>= 2.17)',
  176. + 'libc6 (>= 2.28)',
  177. + 'libcairo2 (>= 1.6.0)',
  178. + 'libcurl3-gnutls | libcurl3-nss | libcurl4 | libcurl3',
  179. + 'libdbus-1-3 (>= 1.9.14)',
  180. + 'libdrm2 (>= 2.4.75)',
  181. + 'libexpat1 (>= 2.1~beta3)',
  182. + 'libgbm1 (>= 17.1.0~rc2)',
  183. + 'libglib2.0-0 (>= 2.37.3)',
  184. + 'libgssapi-krb5-2 (>= 1.17)',
  185. + 'libgtk-3-0 (>= 3.9.10)',
  186. + 'libgtk-3-0 (>= 3.9.10) | libgtk-4-1',
  187. + 'libkrb5-3 (>= 1.6.dfsg.2)',
  188. + 'libnspr4 (>= 2:4.9-2~)',
  189. + 'libnss3 (>= 2:3.30)',
  190. + 'libnss3 (>= 3.26)',
  191. + 'libpango-1.0-0 (>= 1.14.0)',
  192. + 'libstdc++6 (>= 4.1.1)',
  193. + 'libstdc++6 (>= 5)',
  194. + 'libstdc++6 (>= 5.2)',
  195. + 'libstdc++6 (>= 6)',
  196. + 'libx11-6',
  197. + 'libx11-6 (>= 2:1.4.99.1)',
  198. + 'libxcb1 (>= 1.9.2)',
  199. + 'libxcomposite1 (>= 1:0.4.4-1)',
  200. + 'libxdamage1 (>= 1:1.1)',
  201. + 'libxext6',
  202. + 'libxfixes3',
  203. + 'libxkbcommon0 (>= 0.5.0)',
  204. + 'libxkbfile1 (>= 1:1.1.0)',
  205. + 'libxrandr2',
  206. + 'xdg-utils (>= 1.0.2)'
  207. + ],
  208. + 'riscv64': [
  209. + 'ca-certificates',
  210. + 'libatomic1',
  211. + 'libasound2 (>= 1.0.17)',
  212. + 'libatk-bridge2.0-0 (>= 2.5.3)',
  213. + 'libatk1.0-0 (>= 2.2.0)',
  214. + 'libatspi2.0-0 (>= 2.9.90)',
  215. + 'libc6 (>= 2.17)',
  216. + 'libc6 (>= 2.28)',
  217. + 'libcairo2 (>= 1.6.0)',
  218. + 'libcurl3-gnutls | libcurl3-nss | libcurl4 | libcurl3',
  219. + 'libdbus-1-3 (>= 1.0.2)',
  220. + 'libdrm2 (>= 2.4.60)',
  221. + 'libexpat1 (>= 2.0.1)',
  222. + 'libgbm1 (>= 17.1.0~rc2)',
  223. + 'libglib2.0-0 (>= 2.16.0)',
  224. + 'libglib2.0-0 (>= 2.39.4)',
  225. + 'libgtk-3-0 (>= 3.9.10)',
  226. + 'libgtk-3-0 (>= 3.9.10) | libgtk-4-1',
  227. + 'libnspr4 (>= 2:4.9-2~)',
  228. + 'libnss3 (>= 2:3.22)',
  229. + 'libnss3 (>= 3.26)',
  230. + 'libpango-1.0-0 (>= 1.14.0)',
  231. + 'libsecret-1-0 (>= 0.18)',
  232. + 'libstdc++6 (>= 4.1.1)',
  233. + 'libstdc++6 (>= 5)',
  234. + 'libstdc++6 (>= 5.2)',
  235. + 'libstdc++6 (>= 6)',
  236. + 'libx11-6',
  237. + 'libx11-6 (>= 2:1.4.99.1)',
  238. + 'libxcb1 (>= 1.9.2)',
  239. + 'libxcomposite1 (>= 1:0.4.4-1)',
  240. + 'libxdamage1 (>= 1:1.1)',
  241. + 'libxext6',
  242. + 'libxfixes3',
  243. + 'libxkbcommon0 (>= 0.4.1)',
  244. + 'libxkbfile1',
  245. + 'libxrandr2',
  246. + 'xdg-utils (>= 1.0.2)'
  247. + ],
  248. };
  249. diff --git a/build/linux/debian/install-sysroot.js b/build/linux/debian/install-sysroot.js
  250. index feca7d3..59c1c6a 100644
  251. --- a/build/linux/debian/install-sysroot.js
  252. +++ b/build/linux/debian/install-sysroot.js
  253. @@ -70,7 +70,9 @@ async function fetchUrl(options, retries = 10, retryDelay = 1000) {
  254. const timeout = setTimeout(() => controller.abort(), 30 * 1000);
  255. const version = '20240129-253798';
  256. try {
  257. - const response = await fetch(`https://api.github.com/repos/Microsoft/vscode-linux-build-agent/releases/tags/v${version}`, {
  258. + // If the assetName starts with 'powerpc64le', we fetch from VSCodium/vscode-linux-build-agent
  259. + const repo = options.assetName.startsWith('powerpc64le') ? 'VSCodium/vscode-linux-build-agent' : 'Microsoft/vscode-linux-build-agent';
  260. + const response = await fetch(`https://api.github.com/repos/${repo}/releases/tags/v${version}`, {
  261. headers: ghApiHeaders,
  262. signal: controller.signal /* Typings issue with lib.dom.d.ts */
  263. });
  264. @@ -79,7 +81,7 @@ async function fetchUrl(options, retries = 10, retryDelay = 1000) {
  265. const contents = Buffer.from(await response.arrayBuffer());
  266. const asset = JSON.parse(contents.toString()).assets.find((a) => a.name === options.assetName);
  267. if (!asset) {
  268. - throw new Error(`Could not find asset in release of Microsoft/vscode-linux-build-agent @ ${version}`);
  269. + throw new Error(`Could not find asset in release of ${repo} @ ${version}`);
  270. }
  271. console.log(`Found asset ${options.assetName} @ ${asset.url}.`);
  272. const assetResponse = await fetch(asset.url, {
  273. @@ -134,6 +136,14 @@ async function getVSCodeSysroot(arch) {
  274. expectedName = `arm-rpi-linux-gnueabihf${prefix}.tar.gz`;
  275. triple = 'arm-rpi-linux-gnueabihf';
  276. break;
  277. + case 'ppc64le':
  278. + expectedName = `powerpc64le-linux-gnu${prefix}.tar.gz`;
  279. + triple = `powerpc64le-linux-gnu`;
  280. + break;
  281. + case 'riscv64':
  282. + expectedName = `DUMMY`;
  283. + triple = 'riscv64-linux-gnu';
  284. + break;
  285. }
  286. console.log(`Fetching ${expectedName} for ${triple}`);
  287. const checksumSha256 = getVSCodeSysrootChecksum(expectedName);
  288. diff --git a/build/linux/debian/types.ts b/build/linux/debian/types.ts
  289. index e97485ef128..01b121bc928 100644
  290. --- a/build/linux/debian/types.ts
  291. +++ b/build/linux/debian/types.ts
  292. @@ -3,8 +3,8 @@
  293. * Licensed under the MIT License. See License.txt in the project root for license information.
  294. *--------------------------------------------------------------------------------------------*/
  295. -export type DebianArchString = 'amd64' | 'armhf' | 'arm64';
  296. +export type DebianArchString = 'amd64' | 'armhf' | 'arm64' | 'ppc64le' | 'riscv64';
  297. export function isDebianArchString(s: string): s is DebianArchString {
  298. - return ['amd64', 'armhf', 'arm64'].includes(s);
  299. + return ['amd64', 'armhf', 'arm64', 'ppc64le', 'riscv64'].includes(s);
  300. }
  301. diff --git a/cli/src/update_service.rs b/cli/src/update_service.rs
  302. index 4bec13d6e86..3debda1224a 100644
  303. --- a/cli/src/update_service.rs
  304. +++ b/cli/src/update_service.rs
  305. @@ -214,6 +214,9 @@ pub enum Platform {
  306. LinuxARM64Legacy,
  307. LinuxARM32,
  308. LinuxARM32Legacy,
  309. + LinuxPPC64LE,
  310. + LinuxPPC64LELegacy,
  311. + LinuxRISCV64,
  312. DarwinX64,
  313. DarwinARM64,
  314. WindowsX64,
  315. @@ -227,6 +230,8 @@ impl Platform {
  316. Platform::LinuxX64 => Some("linux-x64".to_owned()),
  317. Platform::LinuxARM64 => Some("linux-arm64".to_owned()),
  318. Platform::LinuxARM32 => Some("linux-armhf".to_owned()),
  319. + Platform::LinuxPPC64LE => Some("linux-ppc64le".to_owned()),
  320. + Platform::LinuxRISCV64 => Some("linux-riscv64".to_owned()),
  321. Platform::DarwinX64 => Some("darwin".to_owned()),
  322. Platform::DarwinARM64 => Some("darwin-arm64".to_owned()),
  323. Platform::WindowsX64 => Some("win32-x64-archive".to_owned()),
  324. @@ -245,6 +250,9 @@ impl Platform {
  325. Platform::LinuxARM64Legacy => "server-linux-legacy-arm64",
  326. Platform::LinuxARM32 => "server-linux-armhf",
  327. Platform::LinuxARM32Legacy => "server-linux-legacy-armhf",
  328. + Platform::LinuxPPC64LE => "server-linux-ppc64le",
  329. + Platform::LinuxPPC64LELegacy => "server-linux-legacy-ppc64le",
  330. + Platform::LinuxRISCV64 => "server-linux-riscv64",
  331. Platform::DarwinX64 => "server-darwin",
  332. Platform::DarwinARM64 => "server-darwin-arm64",
  333. Platform::WindowsX64 => "server-win32-x64",
  334. @@ -264,6 +272,9 @@ impl Platform {
  335. Platform::LinuxARM64Legacy => "cli-linux-arm64",
  336. Platform::LinuxARM32 => "cli-linux-armhf",
  337. Platform::LinuxARM32Legacy => "cli-linux-armhf",
  338. + Platform::LinuxPPC64LE => "cli-linux-ppc64le",
  339. + Platform::LinuxPPC64LELegacy => "cli-linux-ppc64le",
  340. + Platform::LinuxRISCV64 => "cli-linux-riscv64",
  341. Platform::DarwinX64 => "cli-darwin-x64",
  342. Platform::DarwinARM64 => "cli-darwin-arm64",
  343. Platform::WindowsARM64 => "cli-win32-arm64",
  344. @@ -296,6 +307,10 @@ impl Platform {
  345. Some(Platform::LinuxARM32)
  346. } else if cfg!(all(target_os = "linux", target_arch = "aarch64")) {
  347. Some(Platform::LinuxARM64)
  348. + } else if cfg!(all(target_os = "linux", target_arch = "ppc64le")) {
  349. + Some(Platform::LinuxPPC64LE)
  350. + } else if cfg!(all(target_os = "linux", target_arch = "riscv64")) {
  351. + Some(Platform::LinuxRISCV64)
  352. } else if cfg!(all(target_os = "macos", target_arch = "x86_64")) {
  353. Some(Platform::DarwinX64)
  354. } else if cfg!(all(target_os = "macos", target_arch = "aarch64")) {
  355. @@ -323,6 +338,9 @@ impl fmt::Display for Platform {
  356. Platform::LinuxARM64Legacy => "LinuxARM64Legacy",
  357. Platform::LinuxARM32 => "LinuxARM32",
  358. Platform::LinuxARM32Legacy => "LinuxARM32Legacy",
  359. + Platform::LinuxPPC64LE => "LinuxPPC64LE",
  360. + Platform::LinuxPPC64LELegacy => "LinuxPPC64LELegacy",
  361. + Platform::LinuxRISCV64 => "LinuxRISCV64",
  362. Platform::DarwinX64 => "DarwinX64",
  363. Platform::DarwinARM64 => "DarwinARM64",
  364. Platform::WindowsX64 => "WindowsX64",
  365. diff --git a/cli/src/util/prereqs.rs b/cli/src/util/prereqs.rs
  366. index 20a5bc94b37..50678354245 100644
  367. --- a/cli/src/util/prereqs.rs
  368. +++ b/cli/src/util/prereqs.rs
  369. @@ -73,6 +73,10 @@ impl PreReqChecker {
  370. Platform::LinuxX64
  371. } else if cfg!(target_arch = "arm") {
  372. Platform::LinuxARM32
  373. + } else if cfg!(target_arch = "ppc64le") {
  374. + Platform::LinuxPPC64LE
  375. + } else if cfg!(target_arch = "riscv64") {
  376. + Platform::LinuxRISCV64
  377. } else {
  378. Platform::LinuxARM64
  379. });
  380. @@ -82,6 +86,8 @@ impl PreReqChecker {
  381. Platform::LinuxX64Legacy
  382. } else if cfg!(target_arch = "arm") {
  383. Platform::LinuxARM32Legacy
  384. + } else if cfg!(target_arch = "ppc64le") {
  385. + Platform::LinuxPPC64LELegacy
  386. } else {
  387. Platform::LinuxARM64Legacy
  388. });
  389. diff --git a/resources/server/bin/helpers/check-requirements-linux.sh b/resources/server/bin/helpers/check-requirements-linux.sh
  390. index 079557869e3..c057746b870 100644
  391. --- a/resources/server/bin/helpers/check-requirements-linux.sh
  392. +++ b/resources/server/bin/helpers/check-requirements-linux.sh
  393. @@ -50,6 +50,8 @@ case $ARCH in
  394. LDCONFIG_ARCH="AArch64"
  395. fi
  396. ;;
  397. + ppc64el) LDCONFIG_ARCH="64bit";;
  398. + riscv64) LDCONFIG_ARCH="RISC-V";;
  399. esac
  400. if [ "$OS_ID" != "alpine" ]; then
  401. diff --git a/src/vs/platform/extensionManagement/common/extensionManagement.ts b/src/vs/platform/extensionManagement/common/extensionManagement.ts
  402. index 9dae82eba07..94246285b26 100644
  403. --- a/src/vs/platform/extensionManagement/common/extensionManagement.ts
  404. +++ b/src/vs/platform/extensionManagement/common/extensionManagement.ts
  405. @@ -33,6 +33,8 @@ export function TargetPlatformToString(targetPlatform: TargetPlatform) {
  406. case TargetPlatform.LINUX_X64: return 'Linux 64 bit';
  407. case TargetPlatform.LINUX_ARM64: return 'Linux ARM 64';
  408. case TargetPlatform.LINUX_ARMHF: return 'Linux ARM';
  409. + case TargetPlatform.LINUX_PPC64LE: return 'Linux PowerPC';
  410. + case TargetPlatform.LINUX_RISCV64: return 'Linux RISC-V 64';
  411. case TargetPlatform.ALPINE_X64: return 'Alpine Linux 64 bit';
  412. case TargetPlatform.ALPINE_ARM64: return 'Alpine ARM 64';
  413. @@ -56,6 +58,8 @@ export function toTargetPlatform(targetPlatform: string): TargetPlatform {
  414. case TargetPlatform.LINUX_X64: return TargetPlatform.LINUX_X64;
  415. case TargetPlatform.LINUX_ARM64: return TargetPlatform.LINUX_ARM64;
  416. case TargetPlatform.LINUX_ARMHF: return TargetPlatform.LINUX_ARMHF;
  417. + case TargetPlatform.LINUX_PPC64LE: return TargetPlatform.LINUX_PPC64LE;
  418. + case TargetPlatform.LINUX_RISCV64: return TargetPlatform.LINUX_RISCV64;
  419. case TargetPlatform.ALPINE_X64: return TargetPlatform.ALPINE_X64;
  420. case TargetPlatform.ALPINE_ARM64: return TargetPlatform.ALPINE_ARM64;
  421. @@ -91,6 +95,12 @@ export function getTargetPlatform(platform: Platform | 'alpine', arch: string |
  422. if (arch === 'arm') {
  423. return TargetPlatform.LINUX_ARMHF;
  424. }
  425. + if (arch === 'ppc64le') {
  426. + return TargetPlatform.LINUX_PPC64LE;
  427. + }
  428. + if (arch === 'riscv64') {
  429. + return TargetPlatform.LINUX_RISCV64;
  430. + }
  431. return TargetPlatform.UNKNOWN;
  432. case 'alpine':
  433. diff --git a/src/vs/platform/extensions/common/extensions.ts b/src/vs/platform/extensions/common/extensions.ts
  434. index 331aba1b55f..cade78e6557 100644
  435. --- a/src/vs/platform/extensions/common/extensions.ts
  436. +++ b/src/vs/platform/extensions/common/extensions.ts
  437. @@ -303,6 +303,8 @@ export const enum TargetPlatform {
  438. LINUX_X64 = 'linux-x64',
  439. LINUX_ARM64 = 'linux-arm64',
  440. LINUX_ARMHF = 'linux-armhf',
  441. + LINUX_PPC64LE = 'linux-ppc64le',
  442. + LINUX_RISCV64 = 'linux-riscv64',
  443. ALPINE_X64 = 'alpine-x64',
  444. ALPINE_ARM64 = 'alpine-arm64',