@@ -175,9 +175,9 @@ param
175
175
# Debug Information
176
176
[switch ] $DebugInfo ,
177
177
[ValidateSet (" codeview" , " dwarf" )]
178
- [string ] $CDebugFormat = " dwarf " ,
178
+ [string ] $CDebugFormat = " codeview " ,
179
179
[ValidateSet (" codeview" , " dwarf" )]
180
- [string ] $SwiftDebugFormat = " dwarf " ,
180
+ [string ] $SwiftDebugFormat = " codeview " ,
181
181
182
182
# Android SDK Options
183
183
[switch ] $Android = $false ,
@@ -244,10 +244,11 @@ if ($WindowsSDKArchitectures.Length -eq 1) { $WindowsSDKArchitectures = $Windows
244
244
245
245
if ($Test.Length -eq 1 ) { $Test = $Test [0 ].Split(" ," ) }
246
246
247
- if ($Test -contains " *" ) {
248
- # Explicitly don't include llbuild yet since tests are known to fail on Windows
249
- $Test = @ (" lld" , " lldb" , " swift" , " dispatch" , " foundation" , " xctest" , " swift-format" , " sourcekit-lsp" )
250
- }
247
+ # if ($Test -contains "*") {
248
+ # # Explicitly don't include llbuild yet since tests are known to fail on Windows
249
+ # $Test = @("lld", "lldb", "swift", "dispatch", "foundation", "xctest", "swift-format", "sourcekit-lsp")
250
+ # }
251
+ $Test = @ (" foundation" )
251
252
252
253
if ($UseHostToolchain -is [string ]) {
253
254
$UseHostToolchain = [System.Convert ]::ToBoolean($UseHostToolchain )
@@ -1369,6 +1370,7 @@ function Build-CMakeProject {
1369
1370
[switch ] $AddAndroidCMakeEnv = $false ,
1370
1371
[switch ] $UseGNUDriver = $false ,
1371
1372
[string ] $SwiftSDK = $null ,
1373
+ [switch ] $IncludeDebugInfo = $DebugInfo ,
1372
1374
[hashtable ] $Defines = @ {}, # Values are either single strings or arrays of flags
1373
1375
[string []] $BuildTargets = @ ()
1374
1376
)
@@ -1435,7 +1437,7 @@ function Build-CMakeProject {
1435
1437
Add-KeyValueIfNew $Defines CMAKE_ASM_FLAGS @ (" --target=$ ( $Platform.Triple ) " )
1436
1438
Add-KeyValueIfNew $Defines CMAKE_ASM_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDLL " /MD"
1437
1439
1438
- if ($DebugInfo ) {
1440
+ if ($IncludeDebugInfo ) {
1439
1441
$ASMDebugFlags = if ($CDebugFormat -eq " dwarf" ) {
1440
1442
if ($UseGNUDriver ) { @ (" -gdwarf" ) } else { @ (" -clang:-gdwarf" ) }
1441
1443
} else {
@@ -1485,7 +1487,7 @@ function Build-CMakeProject {
1485
1487
@ (" /GS-" , " /Gw" , " /Gy" , " /Oy" , " /Oi" , " /Zc:inline" )
1486
1488
}
1487
1489
1488
- if ($DebugInfo ) {
1490
+ if ($IncludeDebugInfo ) {
1489
1491
if ($UsePinnedCompilers.Contains (" C" ) -or $UseBuiltCompilers.Contains (" C" )) {
1490
1492
if ($CDebugFormat -eq " dwarf" ) {
1491
1493
$CFLAGS += if ($UseGNUDriver ) {
@@ -1525,7 +1527,7 @@ function Build-CMakeProject {
1525
1527
@ (" /GS-" , " /Gw" , " /Gy" , " /Oy" , " /Oi" , " /Zc:inline" , " /Zc:__cplusplus" )
1526
1528
}
1527
1529
1528
- if ($DebugInfo ) {
1530
+ if ($IncludeDebugInfo ) {
1529
1531
if ($UsePinnedCompilers.Contains (" CXX" ) -or $UseBuiltCompilers.Contains (" CXX" )) {
1530
1532
if ($CDebugFormat -eq " dwarf" ) {
1531
1533
$CXXFLAGS += if ($UseGNUDriver ) {
@@ -1565,7 +1567,7 @@ function Build-CMakeProject {
1565
1567
@ ()
1566
1568
}
1567
1569
1568
- $SwiftFlags += if ($DebugInfo ) {
1570
+ $SwiftFlags += if ($IncludeDebugInfo ) {
1569
1571
if ($SwiftDebugFormat -eq " dwarf" ) {
1570
1572
@ (" -g" , " -debug-info-format=dwarf" , " -use-ld=lld-link" , " -Xlinker" , " /DEBUG:DWARF" )
1571
1573
} else {
@@ -1592,7 +1594,7 @@ function Build-CMakeProject {
1592
1594
@ (" /INCREMENTAL:NO" , " /OPT:REF" , " /OPT:ICF" )
1593
1595
}
1594
1596
1595
- if ($DebugInfo ) {
1597
+ if ($IncludeDebugInfo ) {
1596
1598
if ($UseASM -or $UseC -or $UseCXX ) {
1597
1599
# Prefer `/Z7` over `/ZI`
1598
1600
# By setting the debug information format, the appropriate C/C++
@@ -1629,7 +1631,7 @@ function Build-CMakeProject {
1629
1631
Add-KeyValueIfNew $Defines CMAKE_C_COMPILER_TARGET $Platform.Triple
1630
1632
1631
1633
$CFLAGS = @ (" --sysroot=${AndroidSysroot} " , " -ffunction-sections" , " -fdata-sections" )
1632
- if ($DebugInfo ) {
1634
+ if ($IncludeDebugInfo ) {
1633
1635
$CFLAGS += @ (" -gdwarf" )
1634
1636
}
1635
1637
Add-FlagsDefine $Defines CMAKE_C_FLAGS $CFLAGS
@@ -1639,7 +1641,7 @@ function Build-CMakeProject {
1639
1641
Add-KeyValueIfNew $Defines CMAKE_CXX_COMPILER_TARGET $Platform.Triple
1640
1642
1641
1643
$CXXFLAGS = @ (" --sysroot=${AndroidSysroot} " , " -ffunction-sections" , " -fdata-sections" )
1642
- if ($DebugInfo ) {
1644
+ if ($IncludeDebugInfo ) {
1643
1645
$CXXFLAGS += @ (" -gdwarf" )
1644
1646
}
1645
1647
Add-FlagsDefine $Defines CMAKE_CXX_FLAGS $CXXFLAGS
@@ -1678,7 +1680,7 @@ function Build-CMakeProject {
1678
1680
" -Xclang-linker" , " -resource-dir" , " -Xclang-linker" , " ${AndroidPrebuiltRoot} \lib\clang\$ ( $ (Get-AndroidNDK ).ClangVersion) "
1679
1681
)
1680
1682
1681
- $SwiftFlags += if ($DebugInfo ) { @ (" -g" ) } else { @ (" -gnone" ) }
1683
+ $SwiftFlags += if ($IncludeDebugInfo ) { @ (" -g" ) } else { @ (" -gnone" ) }
1682
1684
1683
1685
Add-FlagsDefine $Defines CMAKE_Swift_FLAGS $SwiftFlags
1684
1686
# Workaround CMake 3.26+ enabling `-wmo` by default on release builds
@@ -1861,10 +1863,11 @@ function Build-SPMProject {
1861
1863
}
1862
1864
Test {
1863
1865
$ActionName = " test"
1866
+ $Arguments += @ (" -v" )
1864
1867
}
1865
1868
TestParallel {
1866
1869
$ActionName = " test"
1867
- $Arguments += @ (" --parallel" )
1870
+ $Arguments += @ (" --parallel" , " -v " )
1868
1871
}
1869
1872
}
1870
1873
@@ -2938,8 +2941,10 @@ function Test-Foundation {
2938
2941
- Src $SourceCache \swift- foundation `
2939
2942
- Bin " $ScratchPath " `
2940
2943
- Platform $BuildPlatform `
2944
+ - Configuration $FoundationTestConfiguration `
2941
2945
-- multiroot- data- file " $SourceCache \swift\utils\build_swift\resources\SwiftPM-Unified-Build.xcworkspace" `
2942
- -- test-product swift- foundationPackageTests
2946
+ -- test-product swift- foundationPackageTests `
2947
+ - j 2
2943
2948
2944
2949
Invoke-IsolatingEnvVars {
2945
2950
$env: DISPATCH_INCLUDE_PATH = " $ ( Get-SwiftSDK $BuildPlatform.OS ) /usr/include"
@@ -2953,8 +2958,10 @@ function Test-Foundation {
2953
2958
- Src $SourceCache \swift- corelibs- foundation `
2954
2959
- Bin " $ScratchPath " `
2955
2960
- Platform $BuildPlatform `
2961
+ - Configuration $FoundationTestConfiguration `
2956
2962
-- multiroot- data- file " $SourceCache \swift\utils\build_swift\resources\SwiftPM-Unified-Build.xcworkspace" `
2957
- -- test-product swift- corelibs- foundationPackageTests
2963
+ -- test-product swift- corelibs- foundationPackageTests `
2964
+ - j 2
2958
2965
}
2959
2966
}
2960
2967
@@ -3366,6 +3373,7 @@ function Build-Driver([Hashtable] $Platform) {
3366
3373
- Platform $Platform `
3367
3374
- UseBuiltCompilers C, CXX, Swift `
3368
3375
- SwiftSDK (Get-SwiftSDK $Platform.OS ) `
3376
+ - IncludeDebugInfo `
3369
3377
- Defines @ {
3370
3378
BUILD_SHARED_LIBS = " YES" ;
3371
3379
CMAKE_STATIC_LIBRARY_PREFIX_Swift = " lib" ;
0 commit comments