@@ -2875,20 +2875,17 @@ function Install-HostToolchain() {
2875
2875
}
2876
2876
2877
2877
function Build-Inspect ([Platform ]$Platform , $Arch ) {
2878
- $InstallPath = if ($Arch -eq $HostArch ) {
2879
- # Place the host swift-inspect binary with the other toolchain binaries.
2880
- " $ ( $HostArch.ToolchainInstallRoot ) \usr"
2881
- } else {
2882
- " $ ( $Arch.PlatformInstallRoot ) \Developer\Library\$ ( Get-ModuleTriple $Arch ) "
2883
- }
2884
-
2885
- $ArgumentParserDir = if ($Platform -eq " Android" ) {
2886
- # TODO: remove this special-case when the toolchain build moves to a newer version of
2887
- # swift-argument-parser (>= 1.5.0). For now, let CMake fetch the dependency because
2888
- # older versions of swift-argument-parser do not build properly for Android.
2889
- " "
2878
+ if ($Arch -eq $HostArch ) {
2879
+ # When building for the host target, use the host version of the swift-argument-parser,
2880
+ # and place the host swift-inspect executable with the other host toolchain binaries.
2881
+ $ArgumentParserDir = Get-HostProjectCMakeModules ArgumentParser
2882
+ $InstallPath = " $ ( $HostArch.ToolchainInstallRoot ) \usr"
2890
2883
} else {
2891
- Get-HostProjectCMakeModules ArgumentParser
2884
+ # When building for non-host target, let CMake fetch the swift-argument-parser dependency
2885
+ # since it is currently only built for the host and and cannot be built for Android until
2886
+ # the pinned version is >= 1.5.0.
2887
+ $ArgumentParserDir = " "
2888
+ $InstallPath = " $ ( $Arch.PlatformInstallRoot ) \Developer\Library\$ ( Get-ModuleTriple $Arch ) "
2892
2889
}
2893
2890
2894
2891
Build-CMakeProject `
@@ -3051,13 +3048,6 @@ if (-not $SkipBuild) {
3051
3048
Invoke-BuildStep Build-Sanitizers Windows $Arch
3052
3049
Invoke-BuildStep Build-XCTest Windows $Arch
3053
3050
Invoke-BuildStep Build-Testing Windows $Arch
3054
-
3055
- # Windows swift-inspect only supports 64-bit platforms.
3056
- if ($Arch.VSName -eq " amd64" -or
3057
- $Arch.VSName -eq " arm64" ) {
3058
- Invoke-BuildStep Build-Inspect - Platform Windows - Arch $Arch
3059
- }
3060
-
3061
3051
Invoke-BuildStep Write-SDKSettingsPlist Windows $Arch
3062
3052
Invoke-BuildStep Write-PlatformInfoPlist $Arch
3063
3053
}
@@ -3084,7 +3074,6 @@ if (-not $SkipBuild) {
3084
3074
$Arch.AndroidArchABI -eq " x86_64" ) {
3085
3075
Invoke-BuildStep Build-Inspect - Platform Android - Arch $Arch
3086
3076
}
3087
-
3088
3077
Invoke-BuildStep Write-SDKSettingsPlist Android $Arch
3089
3078
Invoke-BuildStep Write-PlatformInfoPlist $Arch
3090
3079
}
@@ -3131,6 +3120,7 @@ if (-not $SkipBuild) {
3131
3120
Invoke-BuildStep Build-LMDB $HostArch
3132
3121
Invoke-BuildStep Build-IndexStoreDB $HostArch
3133
3122
Invoke-BuildStep Build-SourceKitLSP $HostArch
3123
+ Invoke-BuildStep Build-Inspect Windows $HostArch
3134
3124
}
3135
3125
3136
3126
Install-HostToolchain
0 commit comments