Skip to content

Commit 74220ed

Browse files
committed
Merge branch 'main' into dev/grendel/android-clr-host-local
* main: (31 commits) Fix linux-x86 build (dotnet#111861) Add FrozenDictionary specialization for integers / enums (dotnet#111886) [SRM] Refactor reading from streams. (dotnet#111323) Sign the DAC and DBI during the build process instead of in separate steps (dotnet#111416) Removing Entry2MethodDesc as it is unnecessary (dotnet#111756) Cross Product for Vector2 and Vector4 (dotnet#111265) Handle unicode in absolute URI path for combine. (dotnet#111710) Drop RequiresProcessIsolation on mcc tests (dotnet#111887) [main] Update dependencies from dotnet/roslyn (dotnet#111691) new trimmer feature System.TimeZoneInfo.Invariant (dotnet#111215) [browser] reduce msbuild memory footprint (dotnet#111751) Add debugging checks for stack overflow tests failure (dotnet#111867) Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2629821 (dotnet#111884) Bump main to preview2 (dotnet#111882) Avoid generic virtual dispatch for frozen collections alternate lookup (dotnet#108732) Bump main versioning to preview1 (dotnet#111880) Switch OneLoc to main (dotnet#111872) Improve docs on building ILVerify (dotnet#111851) Update Debian version to 13 (dotnet#111768) win32: add fallback to environment vars for system folder (dotnet#109673) ...
2 parents 8ffce8b + cdb88b2 commit 74220ed

File tree

317 files changed

+4100
-3426
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

317 files changed

+4100
-3426
lines changed

docs/design/features/timezone-invariant-mode.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,28 @@ Therefore dotnet bundles the timezone database as binary as part of the runtime.
88
That makes download size larger and application startup slower.
99
If your application doesn't need to work with time zone information, you could use this feature to make the runtime about 200KB smaller.
1010

11-
You enable it in project file:
11+
## Enabling the invariant mode
12+
13+
Applications can enable the invariant mode by either of the following:
14+
15+
1. in project file:
16+
1217
```xml
1318
<PropertyGroup>
1419
<InvariantTimezone>true</InvariantTimezone>
1520
</PropertyGroup>
1621
```
22+
23+
2. in `runtimeconfig.json` file:
24+
25+
```json
26+
{
27+
"runtimeOptions": {
28+
"configProperties": {
29+
"System.TimeZoneInfo.Invariant": true
30+
}
31+
}
32+
}
33+
```
34+
35+
3. setting environment variable value `DOTNET_SYSTEM_TIMEZONE_INVARIANT` to `true` or `1`.

eng/Subsets.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@
386386
PgoInstrument=false;
387387
NoPgoOptimize=true;
388388
TargetOS=linux;
389+
BuildSubdirectory=$(CrossDacHostArch);
389390
CMakeArgs=$(CMakeArgs) -DCLR_CROSS_COMPONENTS_BUILD=1" Category="clr" />
390391
</ItemGroup>
391392

@@ -398,6 +399,7 @@
398399
PgoInstrument=false;
399400
NoPgoOptimize=true;
400401
TargetOS=alpine;
402+
BuildSubdirectory=$(CrossDacHostArch);
401403
CMakeArgs=$(CMakeArgs) -DCLR_CROSS_COMPONENTS_BUILD=1" Category="clr" />
402404
</ItemGroup>
403405

eng/Version.Details.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -376,17 +376,17 @@
376376
<Uri>https://github.com/dotnet/runtime-assets</Uri>
377377
<Sha>6082ed1bb2cfd2d394cdc0ec613c88f3754041f7</Sha>
378378
</Dependency>
379-
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.13.0-3.25057.3">
379+
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.14.0-1.25077.5">
380380
<Uri>https://github.com/dotnet/roslyn</Uri>
381-
<Sha>911cf5f462960bdd01df1ea3c0d0c217b3c3838b</Sha>
381+
<Sha>557c46c532788c16881dbe1b9bd3d938c2ed22e0</Sha>
382382
</Dependency>
383-
<Dependency Name="Microsoft.CodeAnalysis" Version="4.13.0-3.25057.3">
383+
<Dependency Name="Microsoft.CodeAnalysis" Version="4.14.0-1.25077.5">
384384
<Uri>https://github.com/dotnet/roslyn</Uri>
385-
<Sha>911cf5f462960bdd01df1ea3c0d0c217b3c3838b</Sha>
385+
<Sha>557c46c532788c16881dbe1b9bd3d938c2ed22e0</Sha>
386386
</Dependency>
387-
<Dependency Name="Microsoft.CodeAnalysis.CSharp" Version="4.13.0-3.25057.3">
387+
<Dependency Name="Microsoft.CodeAnalysis.CSharp" Version="4.14.0-1.25077.5">
388388
<Uri>https://github.com/dotnet/roslyn</Uri>
389-
<Sha>911cf5f462960bdd01df1ea3c0d0c217b3c3838b</Sha>
389+
<Sha>557c46c532788c16881dbe1b9bd3d938c2ed22e0</Sha>
390390
</Dependency>
391391
<Dependency Name="Microsoft.CodeAnalysis.Analyzers" Version="3.12.0-beta1.24629.1">
392392
<Uri>https://github.com/dotnet/roslyn-analyzers</Uri>
@@ -397,9 +397,9 @@
397397
<Sha>5ed336762c6260a83ece35cd1f6749251452bad0</Sha>
398398
</Dependency>
399399
<!-- Intermediate is necessary for source build. -->
400-
<Dependency Name="Microsoft.SourceBuild.Intermediate.roslyn" Version="4.13.0-3.25057.3">
400+
<Dependency Name="Microsoft.SourceBuild.Intermediate.roslyn" Version="4.14.0-1.25077.5">
401401
<Uri>https://github.com/dotnet/roslyn</Uri>
402-
<Sha>911cf5f462960bdd01df1ea3c0d0c217b3c3838b</Sha>
402+
<Sha>557c46c532788c16881dbe1b9bd3d938c2ed22e0</Sha>
403403
<SourceBuild RepoName="roslyn" ManagedOnly="true" />
404404
</Dependency>
405405
<Dependency Name="Microsoft.DotNet.ApiCompat.Task" Version="10.0.100-alpha.1.24622.2">

eng/Versions.props

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
<PackageVersionNet8>8.0.8</PackageVersionNet8>
1212
<PackageVersionNet7>7.0.20</PackageVersionNet7>
1313
<PackageVersionNet6>6.0.$([MSBuild]::Add($([System.Version]::Parse('$(PackageVersionNet8)').Build),25))</PackageVersionNet6>
14-
<PreReleaseVersionLabel>alpha</PreReleaseVersionLabel>
15-
<PreReleaseVersionIteration>1</PreReleaseVersionIteration>
14+
<PreReleaseVersionLabel>preview</PreReleaseVersionLabel>
15+
<PreReleaseVersionIteration>2</PreReleaseVersionIteration>
1616
<!-- Enable to remove prerelease label. -->
1717
<StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion>
1818
<DotNetFinalVersionKind Condition="'$(StabilizePackageVersion)' == 'true'">release</DotNetFinalVersionKind>
@@ -44,9 +44,9 @@
4444
Any tools that contribute to the design-time experience should use the MicrosoftCodeAnalysisVersion_LatestVS property above to ensure
4545
they do not break the local dev experience.
4646
-->
47-
<MicrosoftCodeAnalysisCSharpVersion>4.13.0-3.25057.3</MicrosoftCodeAnalysisCSharpVersion>
48-
<MicrosoftCodeAnalysisVersion>4.13.0-3.25057.3</MicrosoftCodeAnalysisVersion>
49-
<MicrosoftNetCompilersToolsetVersion>4.13.0-3.25057.3</MicrosoftNetCompilersToolsetVersion>
47+
<MicrosoftCodeAnalysisCSharpVersion>4.14.0-1.25077.5</MicrosoftCodeAnalysisCSharpVersion>
48+
<MicrosoftCodeAnalysisVersion>4.14.0-1.25077.5</MicrosoftCodeAnalysisVersion>
49+
<MicrosoftNetCompilersToolsetVersion>4.14.0-1.25077.5</MicrosoftNetCompilersToolsetVersion>
5050
</PropertyGroup>
5151
<!--
5252
For source generator support we need to target multiple versions of Roslyn in order to be able to run on older versions of Roslyn.

eng/native/functions.cmake

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,3 +678,15 @@ function(adhoc_sign_with_entitlements targetName entitlementsFile)
678678
POST_BUILD
679679
COMMAND codesign -s - -f --entitlements ${entitlementsFile} $<TARGET_FILE:${targetName}>)
680680
endfunction()
681+
682+
function(esrp_sign targetName)
683+
if ("${CLR_CMAKE_ESRP_CLIENT}" STREQUAL "")
684+
return()
685+
endif()
686+
687+
add_custom_command(
688+
TARGET ${targetName}
689+
POST_BUILD
690+
COMMAND powershell -ExecutionPolicy ByPass -NoProfile "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/sign-with-dac-certificate.ps1" -esrpClient ${CLR_CMAKE_ESRP_CLIENT} $<TARGET_FILE:${targetName}>
691+
)
692+
endfunction()
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
[CmdletBinding()]
2+
param(
3+
[string]
4+
[Parameter(Mandatory)]
5+
$esrpClient,
6+
[Parameter(ValueFromRemainingArguments=$true)][string[]]$filesToSign
7+
)
8+
9+
$inputFile = Get-Content -Raw $PSScriptRoot/signing/input.template.json | ConvertFrom-Json
10+
$inputFile.SignBatches.SignRequestFiles = $filesToSign | ForEach-Object {
11+
@{
12+
SourceLocation = $_
13+
}
14+
}
15+
16+
$inputJson = [System.IO.Path]::GetTempFileName()
17+
# Our JSON goes up to 6 levels deep, so we need to set the depth to 6
18+
# to successfully round-trip our JSON through ConvertTo-Json
19+
$inputFile | ConvertTo-Json -Depth 6 | Out-File -FilePath $inputJson -Encoding utf8
20+
21+
$outputJson = Resolve-Path "$PSScriptRoot/../../artifacts/log/Release/signing-$(New-Guid).json.log"
22+
23+
Write-Host "Signing files with DAC certificate"
24+
Write-Host "Logging output to $outputJson"
25+
26+
& $esrpClient sign -a $PSScriptRoot/signing/auth.json -c $PSScriptRoot/signing/config.json -i $inputJson -o $outputJson -p $PSScriptRoot/signing/policy.json
27+
28+
# Validate that the files are signed correctly
29+
foreach ($file in $filesToSign) {
30+
$signingCert = $(Get-AuthenticodeSignature $file).SignerCertificate
31+
if ($null -eq $signingCert)
32+
{
33+
throw "File $file does not contain a signature."
34+
}
35+
36+
if ($signingCert.Subject -ne "CN=.NET DAC, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" `
37+
-or $signingCert.Issuer -ne "CN=Microsoft Code Signing PCA 2010, O=Microsoft Corporation, L=Redmond, S=Washington, C=US")
38+
{
39+
throw "File $file not in expected trust chain."
40+
}
41+
42+
$certEKU = $signingCert.Extensions.Where({ $_.Oid.FriendlyName -eq "Enhanced Key Usage" }) | Select-Object -First 1
43+
44+
if ($certEKU.EnhancedKeyUsages.Where({ $_.Value -eq "1.3.6.1.4.1.311.84.4.1" }).Count -ne 1)
45+
{
46+
throw "Signature for $file does not contain expected EKU."
47+
}
48+
49+
Write-Host "$file is correctly signed."
50+
}

eng/native/signing/auth.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"Version" : "1.0.0",
3+
"AuthenticationType" : "AAD_CERT",
4+
"TenantId" : "72f988bf-86f1-41af-91ab-2d7cd011db47",
5+
"ClientId" : "2234cdec-a13f-4bb2-aa63-04c57fd7a1f9",
6+
"AuthCert" :
7+
{
8+
"SubjectName" : "CN=2234cdec-a13f-4bb2-aa63-04c57fd7a1f9.microsoft.com",
9+
"StoreLocation" : "CurrentUser",
10+
"StoreName": "My",
11+
"SendX5c" : "true"
12+
},
13+
"RequestSigningCert" : {
14+
"SubjectName" : "CN=2234cdec-a13f-4bb2-aa63-04c57fd7a1f9",
15+
"StoreLocation" : "CurrentUser",
16+
"StoreName" : "My"
17+
}
18+
}

eng/native/signing/config.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"Version" : "1.0.0",
3+
"MaxDegreeOfParallelism" : "50",
4+
"ExponentialRetryCount" : "5",
5+
"EsrpSessionTimeoutInSec" : "1800"
6+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"Version": "1.0.0",
3+
"UseMinimatch" : false,
4+
"SignBatches": [
5+
{
6+
"SigningInfo" : {
7+
"Operations" : [
8+
{
9+
"keyCode": "CP-471322",
10+
"operationCode": "SigntoolSign",
11+
"parameters": {
12+
"OpusName": "Microsoft",
13+
"OpusInfo": "http://www.microsoft.com",
14+
"PageHash": "/NPH",
15+
"FileDigest": "/fd sha256",
16+
"TimeStamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
17+
},
18+
"toolName": "sign",
19+
"toolVersion": "1.0"
20+
},
21+
{
22+
"KeyCode": "CP-471322",
23+
"OperationCode": "SigntoolVerify",
24+
"Parameters": {},
25+
"ToolName": "sign",
26+
"ToolVersion": "1.0"
27+
}
28+
]
29+
},
30+
"SourceLocationType" : "UNC",
31+
"DestinationLocationType": "UNC",
32+
"SignRequestFiles" : [
33+
]
34+
}
35+
]
36+
}

eng/native/signing/policy.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"Version": "1.0.0"
3+
}

0 commit comments

Comments
 (0)