Skip to content

Commit db13ca2

Browse files
authored
Changes for ARM support (#5810)
* Changes to enable ARM. * Update fwlinks.
1 parent 6bd6379 commit db13ca2

File tree

5 files changed

+35
-6
lines changed

5 files changed

+35
-6
lines changed

Extension/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,10 @@ The extension has platform-specific binary dependencies, therefore installation
5252
Package | Platform
5353
:--- | :---
5454
`cpptools-linux.vsix` | Linux 64-bit
55-
`cpptools-linux32.vsix` | Linux 32-bit ([available up to version 0.27.0](https://github.com/microsoft/vscode-cpptools/issues/5346))
55+
`cpptools-linux-armhf.vsix` | Linux ARM
5656
`cpptools-osx.vsix` | macOS
5757
`cpptools-win32.vsix` | Windows 64-bit & 32-bit
58+
`cpptools-linux32.vsix` | Linux 32-bit ([available up to version 0.27.0](https://github.com/microsoft/vscode-cpptools/issues/5346))
5859

5960
## Contribution
6061

Extension/package.json

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1795,6 +1795,20 @@
17951795
"./bin/cpptools-srv"
17961796
]
17971797
},
1798+
{
1799+
"description": "C/C++ language components (Linux / armhf)",
1800+
"url": "https://go.microsoft.com/fwlink/?linkid=2135628",
1801+
"platforms": [
1802+
"linux"
1803+
],
1804+
"architectures": [
1805+
"arm"
1806+
],
1807+
"binaries": [
1808+
"./bin/cpptools",
1809+
"./bin/cpptools-srv"
1810+
]
1811+
},
17981812
{
17991813
"description": "C/C++ language components (OS X)",
18001814
"url": "https://go.microsoft.com/fwlink/?linkid=2135549",
@@ -1816,7 +1830,7 @@
18161830
},
18171831
{
18181832
"description": "ClangFormat (Linux / x86_64)",
1819-
"url": "https://go.microsoft.com/fwlink/?LinkID=2117044",
1833+
"url": "https://go.microsoft.com/fwlink/?LinkID=2135581",
18201834
"platforms": [
18211835
"linux"
18221836
],
@@ -1827,9 +1841,22 @@
18271841
"./LLVM/bin/clang-format"
18281842
]
18291843
},
1844+
{
1845+
"description": "ClangFormat (Linux / armhf)",
1846+
"url": "https://go.microsoft.com/fwlink/?LinkID=2135579",
1847+
"platforms": [
1848+
"linux"
1849+
],
1850+
"architectures": [
1851+
"arm"
1852+
],
1853+
"binaries": [
1854+
"./LLVM/bin/clang-format"
1855+
]
1856+
},
18301857
{
18311858
"description": "ClangFormat (OS X)",
1832-
"url": "https://go.microsoft.com/fwlink/?LinkID=2117146",
1859+
"url": "https://go.microsoft.com/fwlink/?LinkID=2135580",
18331860
"platforms": [
18341861
"darwin"
18351862
],
@@ -1839,7 +1866,7 @@
18391866
},
18401867
{
18411868
"description": "ClangFormat (Windows)",
1842-
"url": "https://go.microsoft.com/fwlink/?LinkID=2117043",
1869+
"url": "https://go.microsoft.com/fwlink/?LinkID=2135627",
18431870
"platforms": [
18441871
"win32"
18451872
],

Extension/src/LanguageServer/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ function realActivation(): void {
465465

466466
PlatformInformation.GetPlatformInformation().then(info => {
467467
// Skip Insiders processing for 32-bit Linux.
468-
if (info.platform !== "linux" || info.architecture === "x86_64") {
468+
if (info.platform !== "linux" || info.architecture === "x86_64" || info.architecture === "arm") {
469469
// Skip Insiders processing for unsupported VS Code versions.
470470
// TODO: Change this to not require the hardcoded version to be updated.
471471
const vscodeVersion: PackageVersion = new PackageVersion(vscode.version);

Extension/src/githubAPI.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ export function vsixNameForPlatform(info: PlatformInformation): string {
104104
default: {
105105
switch (platformInfo.architecture) {
106106
case 'x86_64': return 'cpptools-linux.vsix';
107+
case 'arm': return 'cpptools-linux-armhf.vsix';
107108
default: throw new Error(`Unexpected Linux architecture: ${platformInfo.architecture}`);
108109
}
109110
}

Extension/src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const disposables: vscode.Disposable[] = [];
3535

3636
export async function activate(context: vscode.ExtensionContext): Promise<CppToolsApi & CppToolsExtension> {
3737
let errMsg: string = "";
38-
if (process.arch !== 'x64' && (process.platform !== 'win32' || process.arch !== 'ia32')) {
38+
if (process.arch !== 'x64' && (process.platform !== 'win32' || process.arch !== 'ia32') && (process.platform !== 'linux' || (process.arch !== 'x64' && process.arch !== 'arm'))) {
3939
errMsg = localize("architecture.not.supported", "Architecture {0} is not supported. ", String(process.arch));
4040
} else if (process.platform === 'linux' && fs.existsSync('/etc/alpine-release')) {
4141
errMsg = localize("apline.containers.not.supported", "Alpine containers are not supported.");

0 commit comments

Comments
 (0)