mirror of
https://github.com/VSCodium/vscodium.git
synced 2026-04-24 20:00:15 +10:00
refactor: patches (#2797)
This commit is contained in:
108
patches/linux/44-arch-add-loong64.patch
Normal file
108
patches/linux/44-arch-add-loong64.patch
Normal file
@@ -0,0 +1,108 @@
|
||||
diff --git a/build/gulpfile.reh.ts b/build/gulpfile.reh.ts
|
||||
index ff202a7..74bd1bc 100644
|
||||
--- a/build/gulpfile.reh.ts
|
||||
+++ b/build/gulpfile.reh.ts
|
||||
@@ -54,2 +54,3 @@ const BUILD_TARGETS = [
|
||||
{ platform: 'linux', arch: 'riscv64' },
|
||||
+ { platform: 'linux', arch: 'loong64' },
|
||||
{ platform: 'alpine', arch: 'arm64' },
|
||||
diff --git a/build/gulpfile.scan.ts b/build/gulpfile.scan.ts
|
||||
index dd5bb56..e7881de 100644
|
||||
--- a/build/gulpfile.scan.ts
|
||||
+++ b/build/gulpfile.scan.ts
|
||||
@@ -26,2 +26,3 @@ const BUILD_TARGETS = [
|
||||
{ platform: 'linux', arch: 'riscv64' },
|
||||
+ { platform: 'linux', arch: 'loong64' },
|
||||
];
|
||||
diff --git a/build/gulpfile.vscode.linux.ts b/build/gulpfile.vscode.linux.ts
|
||||
index b64dd9a..e146586 100644
|
||||
--- a/build/gulpfile.vscode.linux.ts
|
||||
+++ b/build/gulpfile.vscode.linux.ts
|
||||
@@ -34,2 +34,3 @@ function getDebPackageArch(arch: string): string {
|
||||
case 'riscv64': return 'riscv64';
|
||||
+ case 'loong64': return 'loong64';
|
||||
default: throw new Error(`Unknown arch: ${arch}`);
|
||||
@@ -146,2 +147,3 @@ function getRpmPackageArch(arch: string): string {
|
||||
case 'riscv64': return 'riscv64';
|
||||
+ case 'loong64': return 'loong64';
|
||||
default: throw new Error(`Unknown arch: ${arch}`);
|
||||
@@ -292,2 +294,3 @@ const BUILD_TARGETS = [
|
||||
{ arch: 'riscv64' },
|
||||
+ { arch: 'loong64' },
|
||||
];
|
||||
diff --git a/build/gulpfile.vscode.ts b/build/gulpfile.vscode.ts
|
||||
index 15bd141..cabe16f 100644
|
||||
--- a/build/gulpfile.vscode.ts
|
||||
+++ b/build/gulpfile.vscode.ts
|
||||
@@ -509,2 +509,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 f1afd87..0a5e6df 100644
|
||||
--- a/cli/src/update_service.rs
|
||||
+++ b/cli/src/update_service.rs
|
||||
@@ -188,2 +188,3 @@ pub enum Platform {
|
||||
LinuxRISCV64,
|
||||
+ LinuxLoong64,
|
||||
DarwinX64,
|
||||
@@ -208,2 +209,3 @@ impl Platform {
|
||||
Platform::LinuxRISCV64 => "riscv64",
|
||||
+ Platform::LinuxLoong64 => "loong64",
|
||||
Platform::DarwinX64 => "x64",
|
||||
@@ -229,2 +231,3 @@ impl Platform {
|
||||
Platform::LinuxRISCV64 => "linux",
|
||||
+ Platform::LinuxLoong64 => "linux",
|
||||
Platform::DarwinX64 => "darwin",
|
||||
@@ -261,2 +264,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")) {
|
||||
@@ -290,2 +295,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 1a37552..ff191a1 100644
|
||||
--- a/cli/src/util/prereqs.rs
|
||||
+++ b/cli/src/util/prereqs.rs
|
||||
@@ -86,2 +86,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 b18e402..0b7aa4e 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
|
||||
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 b607327..7162d83 100644
|
||||
--- a/src/vs/platform/extensionManagement/common/extensionManagement.ts
|
||||
+++ b/src/vs/platform/extensionManagement/common/extensionManagement.ts
|
||||
@@ -50,2 +50,3 @@ export function TargetPlatformToString(targetPlatform: TargetPlatform) {
|
||||
case TargetPlatform.LINUX_RISCV64: return 'Linux RISC-V 64';
|
||||
+ case TargetPlatform.LINUX_LOONG64: return 'Linux Loong64';
|
||||
|
||||
@@ -75,2 +76,3 @@ export function toTargetPlatform(targetPlatform: string): TargetPlatform {
|
||||
case TargetPlatform.LINUX_RISCV64: return TargetPlatform.LINUX_RISCV64;
|
||||
+ case TargetPlatform.LINUX_LOONG64: return TargetPlatform.LINUX_LOONG64;
|
||||
|
||||
@@ -116,2 +118,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 96d08cb..51e67ea 100644
|
||||
--- a/src/vs/platform/extensions/common/extensions.ts
|
||||
+++ b/src/vs/platform/extensions/common/extensions.ts
|
||||
@@ -332,2 +332,3 @@ export const enum TargetPlatform {
|
||||
LINUX_RISCV64 = 'linux-riscv64',
|
||||
+ LINUX_LOONG64 = 'linux-loong64',
|
||||
|
||||
Reference in New Issue
Block a user