Skip to content

Commit

Permalink
Changes for ARM support (#5810)
Browse files Browse the repository at this point in the history
* Changes to enable ARM.
* Update fwlinks.
  • Loading branch information
sean-mcmanus authored Jul 21, 2020
1 parent 6bd6379 commit db13ca2
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 6 deletions.
3 changes: 2 additions & 1 deletion Extension/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@ The extension has platform-specific binary dependencies, therefore installation
Package | Platform
:--- | :---
`cpptools-linux.vsix` | Linux 64-bit
`cpptools-linux32.vsix` | Linux 32-bit ([available up to version 0.27.0](https://github.com/microsoft/vscode-cpptools/issues/5346))
`cpptools-linux-armhf.vsix` | Linux ARM
`cpptools-osx.vsix` | macOS
`cpptools-win32.vsix` | Windows 64-bit & 32-bit
`cpptools-linux32.vsix` | Linux 32-bit ([available up to version 0.27.0](https://github.com/microsoft/vscode-cpptools/issues/5346))

## Contribution

Expand Down
33 changes: 30 additions & 3 deletions Extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1795,6 +1795,20 @@
"./bin/cpptools-srv"
]
},
{
"description": "C/C++ language components (Linux / armhf)",
"url": "https://go.microsoft.com/fwlink/?linkid=2135628",
"platforms": [
"linux"
],
"architectures": [
"arm"
],
"binaries": [
"./bin/cpptools",
"./bin/cpptools-srv"
]
},
{
"description": "C/C++ language components (OS X)",
"url": "https://go.microsoft.com/fwlink/?linkid=2135549",
Expand All @@ -1816,7 +1830,7 @@
},
{
"description": "ClangFormat (Linux / x86_64)",
"url": "https://go.microsoft.com/fwlink/?LinkID=2117044",
"url": "https://go.microsoft.com/fwlink/?LinkID=2135581",
"platforms": [
"linux"
],
Expand All @@ -1827,9 +1841,22 @@
"./LLVM/bin/clang-format"
]
},
{
"description": "ClangFormat (Linux / armhf)",
"url": "https://go.microsoft.com/fwlink/?LinkID=2135579",
"platforms": [
"linux"
],
"architectures": [
"arm"
],
"binaries": [
"./LLVM/bin/clang-format"
]
},
{
"description": "ClangFormat (OS X)",
"url": "https://go.microsoft.com/fwlink/?LinkID=2117146",
"url": "https://go.microsoft.com/fwlink/?LinkID=2135580",
"platforms": [
"darwin"
],
Expand All @@ -1839,7 +1866,7 @@
},
{
"description": "ClangFormat (Windows)",
"url": "https://go.microsoft.com/fwlink/?LinkID=2117043",
"url": "https://go.microsoft.com/fwlink/?LinkID=2135627",
"platforms": [
"win32"
],
Expand Down
2 changes: 1 addition & 1 deletion Extension/src/LanguageServer/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ function realActivation(): void {

PlatformInformation.GetPlatformInformation().then(info => {
// Skip Insiders processing for 32-bit Linux.
if (info.platform !== "linux" || info.architecture === "x86_64") {
if (info.platform !== "linux" || info.architecture === "x86_64" || info.architecture === "arm") {
// Skip Insiders processing for unsupported VS Code versions.
// TODO: Change this to not require the hardcoded version to be updated.
const vscodeVersion: PackageVersion = new PackageVersion(vscode.version);
Expand Down
1 change: 1 addition & 0 deletions Extension/src/githubAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ export function vsixNameForPlatform(info: PlatformInformation): string {
default: {
switch (platformInfo.architecture) {
case 'x86_64': return 'cpptools-linux.vsix';
case 'arm': return 'cpptools-linux-armhf.vsix';
default: throw new Error(`Unexpected Linux architecture: ${platformInfo.architecture}`);
}
}
Expand Down
2 changes: 1 addition & 1 deletion Extension/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const disposables: vscode.Disposable[] = [];

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

0 comments on commit db13ca2

Please sign in to comment.