Skip to content

Commit 7bb4c51

Browse files
committed
support for arm64 native tools
1 parent c754776 commit 7bb4c51

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

Extension/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6793,7 +6793,7 @@
67936793
"node-fetch": "^2.7.0",
67946794
"node-loader": "^2.0.0",
67956795
"node-stream-zip": "^1.15.0",
6796-
"node-vcvarsall": "^1.1.1",
6796+
"node-vcvarsall": "^1.2.0",
67976797
"node-vswhere": "^1.0.2",
67986798
"plist": "^3.1.0",
67996799
"posix-getopt": "^1.2.1",

Extension/src/LanguageServer/devcmd.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export async function setEnvironment(context?: vscode.ExtensionContext) {
8989
const host = vars['VSCMD_ARG_HOST_ARCH'];
9090
const target = vars['VSCMD_ARG_TGT_ARCH'];
9191
const arch = vcvars.getArchitecture({
92-
host: match(host, { 'x86': 'x86', 'x64': 'x64' }) ?? 'x64',
92+
host: match(host, { 'x86': 'x86', 'x64': 'x64', 'arm64': 'arm64' }) ?? 'x64',
9393
target: match(target, { 'x86': 'x86', 'x64': 'x64', 'arm64': 'ARM64', 'arm': 'ARM' }) ?? 'x64'
9494
});
9595
const settings = new CppSettings();
@@ -109,7 +109,8 @@ async function getVSInstallations() {
109109
all: true,
110110
prerelease: true,
111111
sort: true,
112-
requires: ['Microsoft.VisualStudio.Component.VC.Tools.x86.x64']
112+
requires: ['Microsoft.VisualStudio.Component.VC.Tools.x86.x64', 'Microsoft.VisualStudio.Component.VC.Tools.ARM64'],
113+
requiresAny: true
113114
});
114115

115116
if (installations.length === 0) {
@@ -217,9 +218,9 @@ async function getHostsAndTargets(vcPath: string): Promise<vcvars.HostTarget[]>
217218
}
218219
const hostTargets: vcvars.HostTarget[] = [];
219220
for (const host of hosts) {
220-
const h = match<'x86' | 'x64' | undefined>(host.toLowerCase(), { 'hostx86': 'x86', 'hostx64': 'x64' });
221+
const h = match<'x86' | 'x64' | 'arm64' | undefined>(host.toLowerCase(), { 'hostx86': 'x86', 'hostx64': 'x64', 'hostarm64': 'arm64' });
221222
if (!h) {
222-
// skip any arm/arm64 folders because there is no arm compiler
223+
// skip any non-matching folders
223224
continue;
224225
}
225226
const targets = await fs.readdir(path.join(vcPath, host));

Extension/yarn.lock

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3559,12 +3559,13 @@ node-stream-zip@^1.15.0:
35593559
resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/node-stream-zip/-/node-stream-zip-1.15.0.tgz#158adb88ed8004c6c49a396b50a6a5de3bca33ea"
35603560
integrity sha1-FYrbiO2ABMbEmjlrUKal3jvKM+o=
35613561

3562-
node-vcvarsall@^1.1.1:
3563-
version "1.1.1"
3564-
resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/node-vcvarsall/-/node-vcvarsall-1.1.1.tgz#ec10a9fafcc7fd4033f716f82a04a2a5a13e1a62"
3565-
integrity sha1-7BCp+vzH/UAz9xb4KgSipaE+GmI=
3562+
node-vcvarsall@^1.2.0:
3563+
version "1.2.0"
3564+
resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/node-vcvarsall/-/node-vcvarsall-1.2.0.tgz#995a5a8e49467f9c45ed83a71c1aa45adb44421a"
3565+
integrity sha1-mVpajklGf5xF7YOnHBqkWttEQho=
35663566
dependencies:
35673567
node-vswhere "^1.0.2"
3568+
semver "^7.7.3"
35683569
tmp "^0.2.5"
35693570

35703571
node-vswhere@^1.0.2:
@@ -4246,6 +4247,11 @@ semver@^7.3.4, semver@^7.3.7, semver@^7.5.4, semver@^7.6.2, semver@^7.6.3:
42464247
resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/semver/-/semver-7.7.1.tgz#abd5098d82b18c6c81f6074ff2647fd3e7220c9f"
42474248
integrity sha1-q9UJjYKxjGyB9gdP8mR/0+ciDJ8=
42484249

4250+
semver@^7.7.3:
4251+
version "7.7.3"
4252+
resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/semver/-/semver-7.7.3.tgz#4b5f4143d007633a8dc671cd0a6ef9147b8bb946"
4253+
integrity sha1-S19BQ9AHYzqNxnHNCm75FHuLuUY=
4254+
42494255
serialize-javascript@^6.0.2:
42504256
version "6.0.2"
42514257
resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2"

0 commit comments

Comments
 (0)