@@ -1845,9 +1845,32 @@ function Build-Runtime([Platform]$Platform, $Arch) {
1845
1845
CMAKE_SHARED_LINKER_FLAGS = if ($Platform -eq " Windows" ) { @ (" /INCREMENTAL:NO" , " /OPT:REF" , " /OPT:ICF" ) } else { @ () };
1846
1846
})
1847
1847
}
1848
+ }
1849
+
1850
+ function Write-SDKSettingsPlist ([Platform ]$Platform , $Arch ) {
1851
+ if ($Platform -eq [Platform ]::Windows) {
1852
+ Invoke-Program " $ ( Get-PythonExecutable ) " - c " import plistlib; print(str(plistlib.dumps({ 'DefaultProperties': { 'DEFAULT_USE_RUNTIME': 'MD' } }), encoding='utf-8'))" `
1853
+ - OutFile " $ ( $Arch.SDKInstallRoot ) \SDKSettings.plist"
1854
+ } else {
1855
+ Invoke-Program " $ ( Get-PythonExecutable ) " - c " import plistlib; print(str(plistlib.dumps({ 'DefaultProperties': { } }), encoding='utf-8'))" `
1856
+ - OutFile " $ ( $Arch.SDKInstallRoot ) \SDKSettings.plist"
1857
+ }
1848
1858
1849
- Invoke-Program " $ ( Get-PythonExecutable ) " - c " import plistlib; print(str(plistlib.dumps({ 'DefaultProperties': { 'DEFAULT_USE_RUNTIME': 'MD' } }), encoding='utf-8'))" `
1850
- - OutFile " $ ( $Arch.SDKInstallRoot ) \SDKSettings.plist"
1859
+ $SDKSettings = @ {
1860
+ CanonicalName = " $ ( $Arch.LLVMTarget ) "
1861
+ DisplayName = " $ ( $Platform.ToString ()) "
1862
+ IsBaseSDK = " NO"
1863
+ Version = " ${ProductVersion} "
1864
+ VersionMap = @ {}
1865
+ DefaultProperties = @ {
1866
+ PLATFORM_NAME = " $ ( $Platform.ToString ()) "
1867
+ DEFAULT_COMPILER = " ${ToolchainIdentifier} "
1868
+ }
1869
+ }
1870
+ if ($Platform -eq [Platform ]::Windows) {
1871
+ $SDKSettings.DefaultProperties.DEFAULT_USE_RUNTIME = " MD"
1872
+ }
1873
+ $SDKSettings | ConvertTo-JSON | Out-FIle - FilePath " $ ( $Arch.SDKInstallRoot ) \SDKSettings.json"
1851
1874
}
1852
1875
1853
1876
function Build-Dispatch ([Platform ]$Platform , $Arch , [switch ]$Test = $false ) {
@@ -2137,6 +2160,7 @@ function Install-Platform([Platform]$Platform, $Arch) {
2137
2160
2138
2161
# Copy plist files (same across architectures)
2139
2162
Copy-File " $ ( $Arch.PlatformInstallRoot ) \Info.plist" ([IO.Path ]::Combine((Get-InstallDir $HostArch ), " Platforms" , " ${Platform} .platform" ))
2163
+ Copy-File " $ ( $Arch.SDKInstallRoot ) \SDKSettings.json" ([IO.Path ]::Combine((Get-InstallDir $HostArch ), " Platforms" , " ${Platform} .platform" , " Developer" , " SDKs" , " ${Platform} .sdk" ))
2140
2164
Copy-File " $ ( $Arch.SDKInstallRoot ) \SDKSettings.plist" ([IO.Path ]::Combine((Get-InstallDir $HostArch ), " Platforms" , " ${Platform} .platform" , " Developer" , " SDKs" , " ${Platform} .sdk" ))
2141
2165
2142
2166
# Copy XCTest
@@ -2814,6 +2838,7 @@ if (-not $SkipBuild) {
2814
2838
Invoke-BuildStep Build-Foundation Windows $Arch
2815
2839
Invoke-BuildStep Build-XCTest Windows $Arch
2816
2840
Invoke-BuildStep Build-Testing Windows $Arch
2841
+ Invoke-BuildStep Write-SDKSettingsPlist Windows $Arch
2817
2842
Invoke-BuildStep Write-PlatformInfoPlist $Arch
2818
2843
}
2819
2844
@@ -2832,6 +2857,7 @@ if (-not $SkipBuild) {
2832
2857
Invoke-BuildStep Build-Foundation Android $Arch
2833
2858
Invoke-BuildStep Build-XCTest Android $Arch
2834
2859
Invoke-BuildStep Build-Testing Android $Arch
2860
+ Invoke-BuildStep Write-SDKSettingsPlist Android $Arch
2835
2861
Invoke-BuildStep Write-PlatformInfoPlist $Arch
2836
2862
}
2837
2863
}
0 commit comments