Skip to content

Commit c938bd9

Browse files
author
Tajudeen
committed
Add support for loong64, riscv64, and ppc64le architectures
- Added loong64, riscv64, ppc64le to BUILD_TARGETS in gulpfile.vscode.js, gulpfile.reh.js, gulpfile.scan.js, and gulpfile.vscode.linux.js - Updated getDebPackageArch and getRpmPackageArch to support new architectures - Added dependency lists for ppc64el, riscv64, and loong64 in dep-lists.ts and dep-lists.js - Added TargetPlatform enum entries for LINUX_PPC64LE, LINUX_RISCV64, LINUX_LOONG64 - Updated TargetPlatformToString, toTargetPlatform, and getTargetPlatform functions This enables building CortexIDE for additional Linux architectures beyond x64, armhf, and arm64.
1 parent 2579ddf commit c938bd9

File tree

8 files changed

+272
-2
lines changed

8 files changed

+272
-2
lines changed

build/gulpfile.reh.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ const BUILD_TARGETS = [
4848
{ platform: 'linux', arch: 'x64' },
4949
{ platform: 'linux', arch: 'armhf' },
5050
{ platform: 'linux', arch: 'arm64' },
51+
{ platform: 'linux', arch: 'ppc64le' },
52+
{ platform: 'linux', arch: 'riscv64' },
53+
{ platform: 'linux', arch: 'loong64' },
5154
{ platform: 'alpine', arch: 'arm64' },
5255
// legacy: we use to ship only one alpine so it was put in the arch, but now we ship
5356
// multiple alpine images and moved to a better model (alpine as the platform)

build/gulpfile.scan.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ const BUILD_TARGETS = [
2424
{ platform: 'linux', arch: 'x64' },
2525
{ platform: 'linux', arch: 'armhf' },
2626
{ platform: 'linux', arch: 'arm64' },
27+
{ platform: 'linux', arch: 'ppc64le' },
28+
{ platform: 'linux', arch: 'riscv64' },
29+
{ platform: 'linux', arch: 'loong64' },
2730
];
2831

2932
// The following files do not have PDBs downloaded for them during the download symbols process.

build/gulpfile.vscode.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,9 @@ const BUILD_TARGETS = [
483483
{ platform: 'linux', arch: 'x64' },
484484
{ platform: 'linux', arch: 'armhf' },
485485
{ platform: 'linux', arch: 'arm64' },
486+
{ platform: 'linux', arch: 'ppc64le' },
487+
{ platform: 'linux', arch: 'riscv64' },
488+
{ platform: 'linux', arch: 'loong64' },
486489
];
487490
BUILD_TARGETS.forEach(buildTarget => {
488491
const dashed = (str) => (str ? `-${str}` : ``);

build/gulpfile.vscode.linux.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const linuxPackageRevision = Math.floor(new Date().getTime() / 1000);
3131
* @param {string} arch
3232
*/
3333
function getDebPackageArch(arch) {
34-
return { x64: 'amd64', armhf: 'armhf', arm64: 'arm64' }[arch];
34+
return { x64: 'amd64', armhf: 'armhf', arm64: 'arm64', ppc64le: 'ppc64el', riscv64: 'riscv64', loong64: 'loong64' }[arch];
3535
}
3636

3737
function prepareDebPackage(arch) {
@@ -145,7 +145,7 @@ function getRpmBuildPath(rpmArch) {
145145
* @param {string} arch
146146
*/
147147
function getRpmPackageArch(arch) {
148-
return { x64: 'x86_64', armhf: 'armv7hl', arm64: 'aarch64' }[arch];
148+
return { x64: 'x86_64', armhf: 'armv7hl', arm64: 'aarch64', ppc64le: 'ppc64le', riscv64: 'riscv64', loong64: 'loong64' }[arch];
149149
}
150150

151151
/**
@@ -303,6 +303,9 @@ const BUILD_TARGETS = [
303303
{ arch: 'x64' },
304304
{ arch: 'armhf' },
305305
{ arch: 'arm64' },
306+
{ arch: 'ppc64le' },
307+
{ arch: 'riscv64' },
308+
{ arch: 'loong64' },
306309
];
307310

308311
BUILD_TARGETS.forEach(({ arch }) => {

build/linux/debian/dep-lists.js

Lines changed: 120 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/linux/debian/dep-lists.ts

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,5 +144,125 @@ export const referenceGeneratedDepsByArch = {
144144
'libxkbfile1 (>= 1:1.1.0)',
145145
'libxrandr2',
146146
'xdg-utils (>= 1.0.2)'
147+
],
148+
'ppc64el': [
149+
'ca-certificates',
150+
'libasound2 (>= 1.0.17)',
151+
'libatk-bridge2.0-0 (>= 2.5.3)',
152+
'libatk1.0-0 (>= 2.11.90)',
153+
'libatspi2.0-0 (>= 2.9.90)',
154+
'libc6 (>= 2.17)',
155+
'libc6 (>= 2.25)',
156+
'libc6 (>= 2.28)',
157+
'libcairo2 (>= 1.6.0)',
158+
'libcurl3-gnutls | libcurl3-nss | libcurl4 | libcurl3',
159+
'libdbus-1-3 (>= 1.9.14)',
160+
'libexpat1 (>= 2.1~beta3)',
161+
'libgbm1 (>= 17.1.0~rc2)',
162+
'libglib2.0-0 (>= 2.37.3)',
163+
'libgtk-3-0 (>= 3.9.10)',
164+
'libgtk-3-0 (>= 3.9.10) | libgtk-4-1',
165+
'libnspr4 (>= 2:4.9-2~)',
166+
'libnss3 (>= 2:3.30)',
167+
'libnss3 (>= 3.26)',
168+
'libpango-1.0-0 (>= 1.14.0)',
169+
'libstdc++6 (>= 4.1.1)',
170+
'libstdc++6 (>= 5)',
171+
'libstdc++6 (>= 5.2)',
172+
'libstdc++6 (>= 6)',
173+
'libstdc++6 (>= 9)',
174+
'libudev1 (>= 183)',
175+
'libx11-6',
176+
'libx11-6 (>= 2:1.4.99.1)',
177+
'libxcb1 (>= 1.9.2)',
178+
'libxcomposite1 (>= 1:0.4.4-1)',
179+
'libxdamage1 (>= 1:1.1)',
180+
'libxext6',
181+
'libxfixes3',
182+
'libxkbcommon0 (>= 0.5.0)',
183+
'libxkbfile1 (>= 1:1.1.0)',
184+
'libxrandr2',
185+
'xdg-utils (>= 1.0.2)',
186+
'zlib1g (>= 1:1.2.3.4)'
187+
],
188+
'riscv64': [
189+
'ca-certificates',
190+
'libasound2 (>= 1.0.17)',
191+
'libatk-bridge2.0-0 (>= 2.5.3)',
192+
'libatk1.0-0 (>= 2.11.90)',
193+
'libatspi2.0-0 (>= 2.9.90)',
194+
'libc6 (>= 2.17)',
195+
'libc6 (>= 2.25)',
196+
'libc6 (>= 2.28)',
197+
'libcairo2 (>= 1.6.0)',
198+
'libcurl3-gnutls | libcurl3-nss | libcurl4 | libcurl3',
199+
'libdbus-1-3 (>= 1.9.14)',
200+
'libexpat1 (>= 2.1~beta3)',
201+
'libgbm1 (>= 17.1.0~rc2)',
202+
'libglib2.0-0 (>= 2.37.3)',
203+
'libgtk-3-0 (>= 3.9.10)',
204+
'libgtk-3-0 (>= 3.9.10) | libgtk-4-1',
205+
'libnspr4 (>= 2:4.9-2~)',
206+
'libnss3 (>= 2:3.30)',
207+
'libnss3 (>= 3.26)',
208+
'libpango-1.0-0 (>= 1.14.0)',
209+
'libstdc++6 (>= 4.1.1)',
210+
'libstdc++6 (>= 5)',
211+
'libstdc++6 (>= 5.2)',
212+
'libstdc++6 (>= 6)',
213+
'libstdc++6 (>= 9)',
214+
'libudev1 (>= 183)',
215+
'libx11-6',
216+
'libx11-6 (>= 2:1.4.99.1)',
217+
'libxcb1 (>= 1.9.2)',
218+
'libxcomposite1 (>= 1:0.4.4-1)',
219+
'libxdamage1 (>= 1:1.1)',
220+
'libxext6',
221+
'libxfixes3',
222+
'libxkbcommon0 (>= 0.5.0)',
223+
'libxkbfile1 (>= 1:1.1.0)',
224+
'libxrandr2',
225+
'xdg-utils (>= 1.0.2)',
226+
'zlib1g (>= 1:1.2.3.4)'
227+
],
228+
'loong64': [
229+
'ca-certificates',
230+
'libasound2 (>= 1.0.17)',
231+
'libatk-bridge2.0-0 (>= 2.5.3)',
232+
'libatk1.0-0 (>= 2.11.90)',
233+
'libatspi2.0-0 (>= 2.9.90)',
234+
'libc6 (>= 2.17)',
235+
'libc6 (>= 2.25)',
236+
'libc6 (>= 2.28)',
237+
'libcairo2 (>= 1.6.0)',
238+
'libcurl3-gnutls | libcurl3-nss | libcurl4 | libcurl3',
239+
'libdbus-1-3 (>= 1.9.14)',
240+
'libexpat1 (>= 2.1~beta3)',
241+
'libgbm1 (>= 17.1.0~rc2)',
242+
'libglib2.0-0 (>= 2.37.3)',
243+
'libgtk-3-0 (>= 3.9.10)',
244+
'libgtk-3-0 (>= 3.9.10) | libgtk-4-1',
245+
'libnspr4 (>= 2:4.9-2~)',
246+
'libnss3 (>= 2:3.30)',
247+
'libnss3 (>= 3.26)',
248+
'libpango-1.0-0 (>= 1.14.0)',
249+
'libstdc++6 (>= 4.1.1)',
250+
'libstdc++6 (>= 5)',
251+
'libstdc++6 (>= 5.2)',
252+
'libstdc++6 (>= 6)',
253+
'libstdc++6 (>= 9)',
254+
'libudev1 (>= 183)',
255+
'libx11-6',
256+
'libx11-6 (>= 2:1.4.99.1)',
257+
'libxcb1 (>= 1.9.2)',
258+
'libxcomposite1 (>= 1:0.4.4-1)',
259+
'libxdamage1 (>= 1:1.1)',
260+
'libxext6',
261+
'libxfixes3',
262+
'libxkbcommon0 (>= 0.5.0)',
263+
'libxkbfile1 (>= 1:1.1.0)',
264+
'libxrandr2',
265+
'xdg-utils (>= 1.0.2)',
266+
'zlib1g (>= 1:1.2.3.4)'
147267
]
148268
};

src/vs/platform/extensionManagement/common/extensionManagement.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ export function TargetPlatformToString(targetPlatform: TargetPlatform) {
4646
case TargetPlatform.LINUX_X64: return 'Linux 64 bit';
4747
case TargetPlatform.LINUX_ARM64: return 'Linux ARM 64';
4848
case TargetPlatform.LINUX_ARMHF: return 'Linux ARM';
49+
case TargetPlatform.LINUX_PPC64LE: return 'Linux PowerPC 64 LE';
50+
case TargetPlatform.LINUX_RISCV64: return 'Linux RISC-V 64';
51+
case TargetPlatform.LINUX_LOONG64: return 'Linux Loong64';
4952

5053
case TargetPlatform.ALPINE_X64: return 'Alpine Linux 64 bit';
5154
case TargetPlatform.ALPINE_ARM64: return 'Alpine ARM 64';
@@ -69,6 +72,9 @@ export function toTargetPlatform(targetPlatform: string): TargetPlatform {
6972
case TargetPlatform.LINUX_X64: return TargetPlatform.LINUX_X64;
7073
case TargetPlatform.LINUX_ARM64: return TargetPlatform.LINUX_ARM64;
7174
case TargetPlatform.LINUX_ARMHF: return TargetPlatform.LINUX_ARMHF;
75+
case TargetPlatform.LINUX_PPC64LE: return TargetPlatform.LINUX_PPC64LE;
76+
case TargetPlatform.LINUX_RISCV64: return TargetPlatform.LINUX_RISCV64;
77+
case TargetPlatform.LINUX_LOONG64: return TargetPlatform.LINUX_LOONG64;
7278

7379
case TargetPlatform.ALPINE_X64: return TargetPlatform.ALPINE_X64;
7480
case TargetPlatform.ALPINE_ARM64: return TargetPlatform.ALPINE_ARM64;
@@ -104,6 +110,15 @@ export function getTargetPlatform(platform: Platform | 'alpine', arch: string |
104110
if (arch === 'arm') {
105111
return TargetPlatform.LINUX_ARMHF;
106112
}
113+
if (arch === 'ppc64le') {
114+
return TargetPlatform.LINUX_PPC64LE;
115+
}
116+
if (arch === 'riscv64') {
117+
return TargetPlatform.LINUX_RISCV64;
118+
}
119+
if (arch === 'loong64') {
120+
return TargetPlatform.LINUX_LOONG64;
121+
}
107122
return TargetPlatform.UNKNOWN;
108123

109124
case 'alpine':

src/vs/platform/extensions/common/extensions.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,9 @@ export const enum TargetPlatform {
328328
LINUX_X64 = 'linux-x64',
329329
LINUX_ARM64 = 'linux-arm64',
330330
LINUX_ARMHF = 'linux-armhf',
331+
LINUX_PPC64LE = 'linux-ppc64le',
332+
LINUX_RISCV64 = 'linux-riscv64',
333+
LINUX_LOONG64 = 'linux-loong64',
331334

332335
ALPINE_X64 = 'alpine-x64',
333336
ALPINE_ARM64 = 'alpine-arm64',

0 commit comments

Comments
 (0)