@@ -121,9 +121,9 @@ param
121
121
[System.IO.FileInfo ] $BinaryCache = " S:\b" ,
122
122
[System.IO.FileInfo ] $ImageRoot = " S:" ,
123
123
[ValidateSet (" codeview" , " dwarf" )]
124
- [string ] $CDebugFormat = " dwarf " ,
124
+ [string ] $CDebugFormat = " codeview " ,
125
125
[ValidateSet (" codeview" , " dwarf" )]
126
- [string ] $SwiftDebugFormat = " dwarf " ,
126
+ [string ] $SwiftDebugFormat = " codeview " ,
127
127
[ValidateRange (1 , 36 )]
128
128
[int ] $AndroidAPILevel = 28 ,
129
129
[string []] $AndroidSDKVersions = @ (" Android" , " AndroidExperimental" ),
@@ -199,10 +199,11 @@ if ($WindowsSDKArchitectures.Length -eq 1) { $WindowsSDKArchitectures = $Windows
199
199
200
200
if ($Test.Length -eq 1 ) { $Test = $Test [0 ].Split(" ," ) }
201
201
202
- if ($Test -contains " *" ) {
203
- # Explicitly don't include llbuild yet since tests are known to fail on Windows
204
- $Test = @ (" lld" , " lldb" , " swift" , " dispatch" , " foundation" , " xctest" , " swift-format" , " sourcekit-lsp" )
205
- }
202
+ # if ($Test -contains "*") {
203
+ # # Explicitly don't include llbuild yet since tests are known to fail on Windows
204
+ # $Test = @("lld", "lldb", "swift", "dispatch", "foundation", "xctest", "swift-format", "sourcekit-lsp")
205
+ # }
206
+ $Test = @ (" foundation" )
206
207
207
208
# # Declare static build and build tool parameters.
208
209
@@ -1310,6 +1311,7 @@ function Build-CMakeProject {
1310
1311
[switch ] $AddAndroidCMakeEnv = $false ,
1311
1312
[switch ] $UseGNUDriver = $false ,
1312
1313
[string ] $SwiftSDK = $null ,
1314
+ [switch ] $IncludeDebugInfo = $DebugInfo ,
1313
1315
[hashtable ] $Defines = @ {}, # Values are either single strings or arrays of flags
1314
1316
[string []] $BuildTargets = @ ()
1315
1317
)
@@ -1376,7 +1378,7 @@ function Build-CMakeProject {
1376
1378
Add-KeyValueIfNew $Defines CMAKE_ASM_FLAGS @ (" --target=$ ( $Platform.Triple ) " )
1377
1379
Add-KeyValueIfNew $Defines CMAKE_ASM_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDLL " /MD"
1378
1380
1379
- if ($DebugInfo ) {
1381
+ if ($IncludeDebugInfo ) {
1380
1382
$ASMDebugFlags = if ($CDebugFormat -eq " dwarf" ) {
1381
1383
if ($UseGNUDriver ) { @ (" -gdwarf" ) } else { @ (" -clang:-gdwarf" ) }
1382
1384
} else {
@@ -1426,7 +1428,7 @@ function Build-CMakeProject {
1426
1428
@ (" /GS-" , " /Gw" , " /Gy" , " /Oy" , " /Oi" , " /Zc:inline" )
1427
1429
}
1428
1430
1429
- if ($DebugInfo ) {
1431
+ if ($IncludeDebugInfo ) {
1430
1432
if ($UsePinnedCompilers.Contains (" C" ) -or $UseBuiltCompilers.Contains (" C" )) {
1431
1433
if ($CDebugFormat -eq " dwarf" ) {
1432
1434
$CFLAGS += if ($UseGNUDriver ) {
@@ -1466,7 +1468,7 @@ function Build-CMakeProject {
1466
1468
@ (" /GS-" , " /Gw" , " /Gy" , " /Oy" , " /Oi" , " /Zc:inline" , " /Zc:__cplusplus" )
1467
1469
}
1468
1470
1469
- if ($DebugInfo ) {
1471
+ if ($IncludeDebugInfo ) {
1470
1472
if ($UsePinnedCompilers.Contains (" CXX" ) -or $UseBuiltCompilers.Contains (" CXX" )) {
1471
1473
if ($CDebugFormat -eq " dwarf" ) {
1472
1474
$CXXFLAGS += if ($UseGNUDriver ) {
@@ -1506,7 +1508,7 @@ function Build-CMakeProject {
1506
1508
@ ()
1507
1509
}
1508
1510
1509
- $SwiftFlags += if ($DebugInfo ) {
1511
+ $SwiftFlags += if ($IncludeDebugInfo ) {
1510
1512
if ($SwiftDebugFormat -eq " dwarf" ) {
1511
1513
@ (" -g" , " -debug-info-format=dwarf" , " -use-ld=lld-link" , " -Xlinker" , " /DEBUG:DWARF" )
1512
1514
} else {
@@ -1533,7 +1535,7 @@ function Build-CMakeProject {
1533
1535
@ (" /INCREMENTAL:NO" , " /OPT:REF" , " /OPT:ICF" )
1534
1536
}
1535
1537
1536
- if ($DebugInfo ) {
1538
+ if ($IncludeDebugInfo ) {
1537
1539
if ($UseASM -or $UseC -or $UseCXX ) {
1538
1540
# Prefer `/Z7` over `/ZI`
1539
1541
# By setting the debug information format, the appropriate C/C++
@@ -1570,7 +1572,7 @@ function Build-CMakeProject {
1570
1572
Add-KeyValueIfNew $Defines CMAKE_C_COMPILER_TARGET $Platform.Triple
1571
1573
1572
1574
$CFLAGS = @ (" --sysroot=${AndroidSysroot} " , " -ffunction-sections" , " -fdata-sections" )
1573
- if ($DebugInfo ) {
1575
+ if ($IncludeDebugInfo ) {
1574
1576
$CFLAGS += @ (" -gdwarf" )
1575
1577
}
1576
1578
Add-FlagsDefine $Defines CMAKE_C_FLAGS $CFLAGS
@@ -1580,7 +1582,7 @@ function Build-CMakeProject {
1580
1582
Add-KeyValueIfNew $Defines CMAKE_CXX_COMPILER_TARGET $Platform.Triple
1581
1583
1582
1584
$CXXFLAGS = @ (" --sysroot=${AndroidSysroot} " , " -ffunction-sections" , " -fdata-sections" )
1583
- if ($DebugInfo ) {
1585
+ if ($IncludeDebugInfo ) {
1584
1586
$CXXFLAGS += @ (" -gdwarf" )
1585
1587
}
1586
1588
Add-FlagsDefine $Defines CMAKE_CXX_FLAGS $CXXFLAGS
@@ -1619,7 +1621,7 @@ function Build-CMakeProject {
1619
1621
" -Xclang-linker" , " -resource-dir" , " -Xclang-linker" , " ${AndroidPrebuiltRoot} \lib\clang\$ ( $ (Get-AndroidNDK ).ClangVersion) "
1620
1622
)
1621
1623
1622
- $SwiftFlags += if ($DebugInfo ) { @ (" -g" ) } else { @ (" -gnone" ) }
1624
+ $SwiftFlags += if ($IncludeDebugInfo ) { @ (" -g" ) } else { @ (" -gnone" ) }
1623
1625
1624
1626
Add-FlagsDefine $Defines CMAKE_Swift_FLAGS $SwiftFlags
1625
1627
# Workaround CMake 3.26+ enabling `-wmo` by default on release builds
@@ -1802,10 +1804,11 @@ function Build-SPMProject {
1802
1804
}
1803
1805
Test {
1804
1806
$ActionName = " test"
1807
+ $Arguments += @ (" -v" )
1805
1808
}
1806
1809
TestParallel {
1807
1810
$ActionName = " test"
1808
- $Arguments += @ (" --parallel" )
1811
+ $Arguments += @ (" --parallel" , " -v " )
1809
1812
}
1810
1813
}
1811
1814
@@ -2850,8 +2853,10 @@ function Test-Foundation {
2850
2853
- Src $SourceCache \swift- foundation `
2851
2854
- Bin " $ScratchPath " `
2852
2855
- Platform $BuildPlatform `
2856
+ - Configuration $FoundationTestConfiguration `
2853
2857
-- multiroot- data- file " $SourceCache \swift\utils\build_swift\resources\SwiftPM-Unified-Build.xcworkspace" `
2854
- -- test-product swift- foundationPackageTests
2858
+ -- test-product swift- foundationPackageTests `
2859
+ - j 2
2855
2860
2856
2861
Invoke-IsolatingEnvVars {
2857
2862
$env: DISPATCH_INCLUDE_PATH = " $ ( Get-SwiftSDK $BuildPlatform.OS ) /usr/include"
@@ -2865,8 +2870,10 @@ function Test-Foundation {
2865
2870
- Src $SourceCache \swift- corelibs- foundation `
2866
2871
- Bin " $ScratchPath " `
2867
2872
- Platform $BuildPlatform `
2873
+ - Configuration $FoundationTestConfiguration `
2868
2874
-- multiroot- data- file " $SourceCache \swift\utils\build_swift\resources\SwiftPM-Unified-Build.xcworkspace" `
2869
- -- test-product swift- corelibs- foundationPackageTests
2875
+ -- test-product swift- corelibs- foundationPackageTests `
2876
+ - j 2
2870
2877
}
2871
2878
}
2872
2879
@@ -3201,6 +3208,7 @@ function Build-Driver([Hashtable] $Platform) {
3201
3208
- Platform $Platform `
3202
3209
- UseBuiltCompilers C, CXX, Swift `
3203
3210
- SwiftSDK (Get-SwiftSDK $Platform.OS ) `
3211
+ - IncludeDebugInfo `
3204
3212
- Defines @ {
3205
3213
BUILD_SHARED_LIBS = " YES" ;
3206
3214
CMAKE_STATIC_LIBRARY_PREFIX_Swift = " lib" ;
0 commit comments