@@ -341,13 +341,11 @@ function Get-AndroidNDKPath {
341341}
342342
343343function Get-FlexExecutable {
344- $flexExecutable = Join-Path - Path $BinaryCache - ChildPath " win_flex_bison\win_flex.exe"
345- return $flexExecutable
344+ return Join-Path - Path $BinaryCache - ChildPath " win_flex_bison\win_flex.exe"
346345}
347346
348347function Get-BisonExecutable {
349- $bisonExecutable = Join-Path - Path $BinaryCache - ChildPath " win_flex_bison\win_bison.exe"
350- return $bisonExecutable
348+ return Join-Path - Path $BinaryCache - ChildPath " win_flex_bison\win_bison.exe"
351349}
352350
353351function Get-InstallDir ($Arch ) {
@@ -446,7 +444,6 @@ enum HostComponent {
446444 LMDB
447445 SymbolKit
448446 DocC
449- RegsGen2
450447}
451448
452449function Get-HostProjectBinaryCache ([HostComponent ]$Project ) {
@@ -462,6 +459,7 @@ enum BuildComponent {
462459 Compilers
463460 FoundationMacros
464461 TestingMacros
462+ RegsGen2
465463}
466464
467465function Get-BuildProjectBinaryCache ([BuildComponent ]$Project ) {
@@ -1520,7 +1518,7 @@ function Build-RegsGen2($Arch) {
15201518
15211519 Build-CMakeProject `
15221520 - Src $SourceCache \ds2\Tools\RegsGen2 `
1523- - Bin " $ ( Get-HostProjectBinaryCache RegsGen2) " `
1521+ - Bin " $ ( Get-BuildProjectBinaryCache RegsGen2) " `
15241522 - Arch $Arch `
15251523 - BuildTargets default `
15261524 - UseMSVCCompilers C, CXX `
@@ -1542,7 +1540,7 @@ function Build-DS2([Platform]$Platform, $Arch) {
15421540 - BuildTargets default `
15431541 - Defines @ {
15441542 CMAKE_SYSTEM_NAME = $Platform.ToString ();
1545- DS2_REGSGEN2 = " $ ( Get-HostProjectBinaryCache RegsGen2) /regsgen2.exe" ;
1543+ DS2_REGSGEN2 = " $ ( Get-BuildProjectBinaryCache RegsGen2) /regsgen2.exe" ;
15461544 BISON_EXECUTABLE = " $ ( Get-BisonExecutable ) " ;
15471545 FLEX_EXECUTABLE = " $ ( Get-FlexExecutable ) " ;
15481546 }
@@ -2517,6 +2515,9 @@ if (-not $SkipBuild) {
25172515 if ($IsCrossCompiling ) {
25182516 Invoke-BuildStep Build-Compilers - Build $BuildArch
25192517 }
2518+ if ($IncludeDS2 ) {
2519+ Invoke-BuildStep Build-RegsGen2 $BuildArch
2520+ }
25202521
25212522 Invoke-BuildStep Build-CMark $HostArch
25222523 Invoke-BuildStep Build-Compilers $HostArch
@@ -2529,10 +2530,6 @@ if ($Clean) {
25292530 }
25302531}
25312532
2532- if (-not $SkipBuild -and $IncludeDS2 ) {
2533- Invoke-BuildStep Build-RegsGen2 $HostArch
2534- }
2535-
25362533if (-not $SkipBuild ) {
25372534 foreach ($Arch in $WindowsSDKArchs ) {
25382535 Invoke-BuildStep Build-ZLib Windows $Arch
0 commit comments