@@ -1562,6 +1562,20 @@ function Build-BuildTools($Arch) {
1562
1562
}
1563
1563
}
1564
1564
1565
+ function Write-PList {
1566
+ [CmdletBinding (PositionalBinding = $false )]
1567
+ param
1568
+ (
1569
+ [Parameter (Mandatory = $true )]
1570
+ [PSCustomObject ] $Settings ,
1571
+ [Parameter (Mandatory = $true )]
1572
+ [string ] $Path
1573
+ )
1574
+
1575
+ Invoke-Program " $ ( Get-PythonExecutable ) " - c " import plistlib; print(str(plistlib.dumps($ ( ($Settings | ConvertTo-JSON - Compress) -replace ' "' , " '" ) ), encoding='utf-8'))" `
1576
+ - OutFile $Path
1577
+ }
1578
+
1565
1579
function Build-Compilers () {
1566
1580
[CmdletBinding (PositionalBinding = $false )]
1567
1581
param
@@ -1714,8 +1728,13 @@ function Build-Compilers() {
1714
1728
})
1715
1729
}
1716
1730
1717
- Invoke-Program " $ ( Get-PythonExecutable ) " - c " import plistlib; print(str(plistlib.dumps({ 'Identifier': '${ToolchainIdentifier} ', 'FallbackLibrarySearchPaths': ['usr/bin'], 'Version': '${ProductVersion} ' }), encoding='utf-8'))" `
1718
- - OutFile " $ ( $Arch.ToolchainInstallRoot ) \ToolchainInfo.plist"
1731
+ $Settings = @ {
1732
+ FallbackLibrarySearchPaths = @ (" usr/bin" )
1733
+ Identifier = " ${ToolchainIdentifier} "
1734
+ Version = " ${ProductVersion} "
1735
+ }
1736
+
1737
+ Write-PList - Settings $Settings - Path " $ ( $Arch.ToolchainInstallRoot ) \ToolchainInfo.plist"
1719
1738
}
1720
1739
1721
1740
# Reference: https://github.com/microsoft/mimalloc/tree/dev/bin#minject
@@ -2129,13 +2148,14 @@ function Build-ExperimentalRuntime {
2129
2148
}
2130
2149
2131
2150
function Write-SDKSettingsPlist ([Platform ]$Platform , $Arch ) {
2151
+ $SDKSettings = @ {
2152
+ DefaultProperties = @ {
2153
+ }
2154
+ }
2132
2155
if ($Platform -eq [Platform ]::Windows) {
2133
- Invoke-Program " $ ( Get-PythonExecutable ) " - c " import plistlib; print(str(plistlib.dumps({ 'DefaultProperties': { 'DEFAULT_USE_RUNTIME': 'MD' } }), encoding='utf-8'))" `
2134
- - OutFile " $ ( $Arch.SDKInstallRoot ) \SDKSettings.plist"
2135
- } else {
2136
- Invoke-Program " $ ( Get-PythonExecutable ) " - c " import plistlib; print(str(plistlib.dumps({ 'DefaultProperties': { } }), encoding='utf-8'))" `
2137
- - OutFile " $ ( $Arch.SDKInstallRoot ) \SDKSettings.plist"
2156
+ $SDKSettings.DefaultProperties.DEFAULT_USE_RUNTIME = " MD"
2138
2157
}
2158
+ Write-PList - Settings $SDKSettings - Path " $ ( $Arch.SDKInstallRoot ) \SDKSettings.plist"
2139
2159
2140
2160
$SDKSettings = @ {
2141
2161
CanonicalName = " $ ( $Arch.LLVMTarget ) "
@@ -2387,8 +2407,17 @@ function Build-Testing([Platform]$Platform, $Arch, [switch]$Test = $false) {
2387
2407
}
2388
2408
2389
2409
function Write-PlatformInfoPlist ([Platform ] $Platform ) {
2390
- Invoke-Program " $ ( Get-PythonExecutable ) " - c " import plistlib; print(str(plistlib.dumps({ 'DefaultProperties': { 'XCTEST_VERSION': 'development', 'SWIFT_TESTING_VERSION': 'development', 'SWIFTC_FLAGS': ['-use-ld=lld'] } }), encoding='utf-8'))" `
2391
- - OutFile ([IO.Path ]::Combine((Get-PlatformRoot $Platform ), " Info.plist" ))
2410
+ $Settings = @ {
2411
+ DefaultProperties = @ {
2412
+ SWIFT_TESTING_VERSION = " development"
2413
+ XCTEST_VERSION = " development"
2414
+ }
2415
+ }
2416
+ if ($Platform -eq [Platform ]::Windows) {
2417
+ $Settings.DefaultProperties.SWIFTC_FLAGS = @ ( " -use-ld=lld" )
2418
+ }
2419
+
2420
+ Write-PList - Settings $Settings - Path " $ ( Get-PlatformRoot $Platform ) \Info.plist"
2392
2421
}
2393
2422
2394
2423
# Copies files installed by CMake from the arch-specific platform root,
0 commit comments