@@ -341,13 +341,11 @@ function Get-AndroidNDKPath {
341
341
}
342
342
343
343
function 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"
346
345
}
347
346
348
347
function 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"
351
349
}
352
350
353
351
function Get-InstallDir ($Arch ) {
@@ -446,7 +444,6 @@ enum HostComponent {
446
444
LMDB
447
445
SymbolKit
448
446
DocC
449
- RegsGen2
450
447
}
451
448
452
449
function Get-HostProjectBinaryCache ([HostComponent ]$Project ) {
@@ -462,6 +459,7 @@ enum BuildComponent {
462
459
Compilers
463
460
FoundationMacros
464
461
TestingMacros
462
+ RegsGen2
465
463
}
466
464
467
465
function Get-BuildProjectBinaryCache ([BuildComponent ]$Project ) {
@@ -1520,7 +1518,7 @@ function Build-RegsGen2($Arch) {
1520
1518
1521
1519
Build-CMakeProject `
1522
1520
- Src $SourceCache \ds2\Tools\RegsGen2 `
1523
- - Bin " $ ( Get-HostProjectBinaryCache RegsGen2) " `
1521
+ - Bin " $ ( Get-BuildProjectBinaryCache RegsGen2) " `
1524
1522
- Arch $Arch `
1525
1523
- BuildTargets default `
1526
1524
- UseMSVCCompilers C, CXX `
@@ -1542,7 +1540,7 @@ function Build-DS2([Platform]$Platform, $Arch) {
1542
1540
- BuildTargets default `
1543
1541
- Defines @ {
1544
1542
CMAKE_SYSTEM_NAME = $Platform.ToString ();
1545
- DS2_REGSGEN2 = " $ ( Get-HostProjectBinaryCache RegsGen2) /regsgen2.exe" ;
1543
+ DS2_REGSGEN2 = " $ ( Get-BuildProjectBinaryCache RegsGen2) /regsgen2.exe" ;
1546
1544
BISON_EXECUTABLE = " $ ( Get-BisonExecutable ) " ;
1547
1545
FLEX_EXECUTABLE = " $ ( Get-FlexExecutable ) " ;
1548
1546
}
@@ -2517,6 +2515,9 @@ if (-not $SkipBuild) {
2517
2515
if ($IsCrossCompiling ) {
2518
2516
Invoke-BuildStep Build-Compilers - Build $BuildArch
2519
2517
}
2518
+ if ($IncludeDS2 ) {
2519
+ Invoke-BuildStep Build-RegsGen2 $BuildArch
2520
+ }
2520
2521
2521
2522
Invoke-BuildStep Build-CMark $HostArch
2522
2523
Invoke-BuildStep Build-Compilers $HostArch
@@ -2529,10 +2530,6 @@ if ($Clean) {
2529
2530
}
2530
2531
}
2531
2532
2532
- if (-not $SkipBuild -and $IncludeDS2 ) {
2533
- Invoke-BuildStep Build-RegsGen2 $HostArch
2534
- }
2535
-
2536
2533
if (-not $SkipBuild ) {
2537
2534
foreach ($Arch in $WindowsSDKArchs ) {
2538
2535
Invoke-BuildStep Build-ZLib Windows $Arch
0 commit comments