Skip to content

Commit cd726e7

Browse files
authored
Fix -vs arg for ilc/crossgen (#117268)
1 parent 2c426a1 commit cd726e7

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

eng/build.ps1

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ if ($vs) {
176176
}
177177

178178
# Auto-generated solution file that still uses the sln format
179-
if ($vs -ieq "coreclr.sln") {
180-
# If someone passes in coreclr.sln (case-insensitive),
179+
if ($vs -ieq "coreclr.sln" -or $vs -ieq "coreclr") {
180+
# If someone passes in coreclr.sln or just coreclr (case-insensitive),
181181
# launch the generated CMake solution.
182182
$vs = Split-Path $PSScriptRoot -Parent | Join-Path -ChildPath "artifacts\obj\coreclr" | Join-Path -ChildPath "windows.$archToOpen.$((Get-Culture).TextInfo.ToTitleCase($configToOpen))" | Join-Path -ChildPath "ide" | Join-Path -ChildPath "CoreCLR.sln"
183183
if (-Not (Test-Path $vs)) {
@@ -192,7 +192,7 @@ if ($vs) {
192192
}
193193
}
194194
# Auto-generated solution file that still uses the sln format
195-
elseif ($vs -ieq "corehost.sln") {
195+
elseif ($vs -ieq "corehost.sln" -or $vs -ieq "corehost") {
196196
$vs = Split-Path $PSScriptRoot -Parent | Join-Path -ChildPath "artifacts\obj\" | Join-Path -ChildPath "win-$archToOpen.$((Get-Culture).TextInfo.ToTitleCase($configToOpen))" | Join-Path -ChildPath "corehost" | Join-Path -ChildPath "ide" | Join-Path -ChildPath "corehost.sln"
197197
if (-Not (Test-Path $vs)) {
198198
Invoke-Expression "& `"$repoRoot/eng/common/msbuild.ps1`" $repoRoot/src/native/corehost/corehost.proj /clp:nosummary /restore /p:Ninja=false /p:Configuration=$configToOpen /p:TargetArchitecture=$archToOpen /p:ConfigureOnly=true"
@@ -214,6 +214,11 @@ if ($vs) {
214214
} else {
215215
# Search for the solution in coreclr
216216
$vs = Split-Path $PSScriptRoot -Parent | Join-Path -ChildPath "src\coreclr" | Join-Path -ChildPath $vs | Join-Path -ChildPath "$vs.slnx"
217+
218+
# Also, search for the solution in coreclr\tools\aot
219+
if (-Not (Test-Path $vs)) {
220+
$vs = Split-Path $PSScriptRoot -Parent | Join-Path -ChildPath "src\coreclr\tools\aot\$solution.slnx"
221+
}
217222
}
218223

219224
if (-Not (Test-Path $vs)) {

0 commit comments

Comments
 (0)