Skip to content

Commit a20608c

Browse files
Update dependencies from https://github.com/dotnet/arcade build 20240522.5 (#9154)
[main] Update dependencies from dotnet/arcade
1 parent ee0492e commit a20608c

File tree

6 files changed

+112
-44
lines changed

6 files changed

+112
-44
lines changed

eng/Version.Details.xml

+8-8
Original file line numberDiff line numberDiff line change
@@ -157,25 +157,25 @@
157157
</Dependency>
158158
</ProductDependencies>
159159
<ToolsetDependencies>
160-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24270.3">
160+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24272.5">
161161
<Uri>https://github.com/dotnet/arcade</Uri>
162-
<Sha>1cf3eaa1f6ada43ab988145a3f3efddb1ffa3b10</Sha>
162+
<Sha>2001d73c8ff942331a73300ba61fa6164805b231</Sha>
163163
</Dependency>
164-
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="9.0.0-beta.24270.3">
164+
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="9.0.0-beta.24272.5">
165165
<Uri>https://github.com/dotnet/arcade</Uri>
166-
<Sha>1cf3eaa1f6ada43ab988145a3f3efddb1ffa3b10</Sha>
166+
<Sha>2001d73c8ff942331a73300ba61fa6164805b231</Sha>
167167
</Dependency>
168-
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="9.0.0-beta.24270.3">
168+
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="9.0.0-beta.24272.5">
169169
<Uri>https://github.com/dotnet/arcade</Uri>
170-
<Sha>1cf3eaa1f6ada43ab988145a3f3efddb1ffa3b10</Sha>
170+
<Sha>2001d73c8ff942331a73300ba61fa6164805b231</Sha>
171171
</Dependency>
172172
<Dependency Name="Microsoft.DotNet.ApiCompat" Version="9.0.0-beta.24053.1">
173173
<Uri>https://github.com/dotnet/arcade</Uri>
174174
<Sha>f4e11a15c7b8a949d4a366e792a9843ff6e88cd5</Sha>
175175
</Dependency>
176-
<Dependency Name="Microsoft.DotNet.GenAPI" Version="9.0.0-beta.24270.3">
176+
<Dependency Name="Microsoft.DotNet.GenAPI" Version="9.0.0-beta.24272.5">
177177
<Uri>https://github.com/dotnet/arcade</Uri>
178-
<Sha>1cf3eaa1f6ada43ab988145a3f3efddb1ffa3b10</Sha>
178+
<Sha>2001d73c8ff942331a73300ba61fa6164805b231</Sha>
179179
</Dependency>
180180
<Dependency Name="Microsoft.SourceLink.AzureRepos.Git" Version="8.0.0-beta.23409.2">
181181
<Uri>https://github.com/dotnet/sourcelink</Uri>

eng/Versions.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<!-- Packages that come from https://github.com/dotnet/arcade -->
5050
<PropertyGroup>
5151
<MicrosoftDotNetApiCompatVersion>9.0.0-beta.24053.1</MicrosoftDotNetApiCompatVersion>
52-
<MicrosoftDotNetCodeAnalysisPackageVersion>9.0.0-beta.24270.3</MicrosoftDotNetCodeAnalysisPackageVersion>
52+
<MicrosoftDotNetCodeAnalysisPackageVersion>9.0.0-beta.24272.5</MicrosoftDotNetCodeAnalysisPackageVersion>
5353
</PropertyGroup>
5454
<!-- Sourcelink -->
5555
<PropertyGroup>

eng/common/core-templates/job/source-index-stage1.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
parameters:
22
runAsPublic: false
3-
sourceIndexUploadPackageVersion: 2.0.0-20240502.12
4-
sourceIndexProcessBinlogPackageVersion: 1.0.1-20240129.2
3+
sourceIndexUploadPackageVersion: 2.0.0-20240522.1
4+
sourceIndexProcessBinlogPackageVersion: 1.0.1-20240522.1
55
sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json
66
sourceIndexBuildCommand: powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/common/build.ps1 -restore -build -binarylog -ci"
77
preSteps: []
@@ -88,4 +88,4 @@ jobs:
8888
displayName: "Login to Azure"
8989
9090
- script: $(Agent.TempDirectory)/.source-index/tools/UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name) -s netsourceindexstage1 -b stage1
91-
displayName: Upload stage1 artifacts to source index
91+
displayName: Upload stage1 artifacts to source index

eng/common/native/init-compiler.sh

+55-30
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
#
33
# This file detects the C/C++ compiler and exports it to the CC/CXX environment variables
44
#
5-
# NOTE: some scripts source this file and rely on stdout being empty, make sure to not output anything here!
5+
# NOTE: some scripts source this file and rely on stdout being empty, make sure
6+
# to not output *anything* here, unless it is an error message that fails the
7+
# build.
68

79
if [ -z "$build_arch" ] || [ -z "$compiler" ]; then
810
echo "Usage..."
@@ -58,6 +60,26 @@ check_version_exists() {
5860
echo "$desired_version"
5961
}
6062

63+
__baseOS="$(uname)"
64+
set_compiler_version_from_CC() {
65+
if [ "$__baseOS" = "Darwin" ]; then
66+
# On Darwin, the versions from -version/-dumpversion refer to Xcode
67+
# versions, not llvm versions, so we can't rely on them.
68+
return
69+
fi
70+
71+
version="$("$CC" -dumpversion)"
72+
if [ -z "$version" ]; then
73+
echo "Error: $CC -dumpversion didn't provide a version"
74+
exit 1
75+
fi
76+
77+
# gcc and clang often display 3 part versions. However, gcc can show only 1 part in some environments.
78+
IFS=. read -r majorVersion minorVersion _ <<EOF
79+
$version
80+
EOF
81+
}
82+
6183
if [ -z "$CLR_CC" ]; then
6284

6385
# Set default versions
@@ -74,64 +96,67 @@ if [ -z "$CLR_CC" ]; then
7496
done
7597

7698
if [ -z "$majorVersion" ]; then
77-
if command -v "$compiler" > /dev/null; then
78-
if [ "$(uname)" != "Darwin" ]; then
79-
echo "Warning: Specific version of $compiler not found, falling back to use the one in PATH."
80-
fi
81-
CC="$(command -v "$compiler")"
82-
CXX="$(command -v "$cxxCompiler")"
83-
else
84-
echo "No usable version of $compiler found."
99+
if ! command -v "$compiler" > /dev/null; then
100+
echo "Error: No usable version of $compiler found."
85101
exit 1
86102
fi
103+
104+
CC="$(command -v "$compiler" 2> /dev/null)"
105+
CXX="$(command -v "$cxxCompiler" 2> /dev/null)"
106+
set_compiler_version_from_CC
87107
else
88-
if [ "$compiler" = "clang" ] && [ "$majorVersion" -lt 5 ]; then
89-
if [ "$build_arch" = "arm" ] || [ "$build_arch" = "armel" ]; then
90-
if command -v "$compiler" > /dev/null; then
91-
echo "Warning: Found clang version $majorVersion which is not supported on arm/armel architectures, falling back to use clang from PATH."
92-
CC="$(command -v "$compiler")"
93-
CXX="$(command -v "$cxxCompiler")"
94-
else
95-
echo "Found clang version $majorVersion which is not supported on arm/armel architectures, and there is no clang in PATH."
96-
exit 1
97-
fi
108+
if [ "$compiler" = "clang" ] && [ "$majorVersion" -lt 5 ] && { [ "$build_arch" = "arm" ] || [ "$build_arch" = "armel" ]; }; then
109+
# If a major version was provided explicitly, and it was too old, find a newer compiler instead
110+
if ! command -v "$compiler" > /dev/null; then
111+
echo "Error: Found clang version $majorVersion which is not supported on arm/armel architectures, and there is no clang in PATH."
112+
exit 1
98113
fi
114+
115+
CC="$(command -v "$compiler" 2> /dev/null)"
116+
CXX="$(command -v "$cxxCompiler" 2> /dev/null)"
117+
set_compiler_version_from_CC
99118
fi
100119
fi
101120
else
102121
desired_version="$(check_version_exists "$majorVersion" "$minorVersion")"
103122
if [ "$desired_version" = "-1" ]; then
104-
echo "Could not find specific version of $compiler: $majorVersion $minorVersion."
123+
echo "Error: Could not find specific version of $compiler: $majorVersion $minorVersion."
105124
exit 1
106125
fi
107126
fi
108127

109128
if [ -z "$CC" ]; then
110-
CC="$(command -v "$compiler$desired_version")"
111-
CXX="$(command -v "$cxxCompiler$desired_version")"
112-
if [ -z "$CXX" ]; then CXX="$(command -v "$cxxCompiler")"; fi
129+
CC="$(command -v "$compiler$desired_version" 2> /dev/null)"
130+
CXX="$(command -v "$cxxCompiler$desired_version" 2> /dev/null)"
131+
if [ -z "$CXX" ]; then CXX="$(command -v "$cxxCompiler" 2> /dev/null)"; fi
132+
set_compiler_version_from_CC
113133
fi
114134
else
115135
if [ ! -f "$CLR_CC" ]; then
116-
echo "CLR_CC is set but path '$CLR_CC' does not exist"
136+
echo "Error: CLR_CC is set but path '$CLR_CC' does not exist"
117137
exit 1
118138
fi
119139
CC="$CLR_CC"
120140
CXX="$CLR_CXX"
141+
set_compiler_version_from_CC
121142
fi
122143

123144
if [ -z "$CC" ]; then
124-
echo "Unable to find $compiler."
145+
echo "Error: Unable to find $compiler."
125146
exit 1
126147
fi
127148

128-
# Only lld version >= 9 can be considered stable. lld supports s390x starting from 18.0.
129-
if [ "$compiler" = "clang" ] && [ -n "$majorVersion" ] && [ "$majorVersion" -ge 9 ] && ([ "$build_arch" != "s390x" ] || [ "$majorVersion" -ge 18 ]); then
130-
if "$CC" -fuse-ld=lld -Wl,--version >/dev/null 2>&1; then
131-
LDFLAGS="-fuse-ld=lld"
149+
if [ "$__baseOS" != "Darwin" ]; then
150+
# On Darwin, we always want to use the Apple linker.
151+
152+
# Only lld version >= 9 can be considered stable. lld supports s390x starting from 18.0.
153+
if [ "$compiler" = "clang" ] && [ -n "$majorVersion" ] && [ "$majorVersion" -ge 9 ] && { [ "$build_arch" != "s390x" ] || [ "$majorVersion" -ge 18 ]; }; then
154+
if "$CC" -fuse-ld=lld -Wl,--version >/dev/null 2>&1; then
155+
LDFLAGS="-fuse-ld=lld"
156+
fi
132157
fi
133158
fi
134159

135-
SCAN_BUILD_COMMAND="$(command -v "scan-build$desired_version")"
160+
SCAN_BUILD_COMMAND="$(command -v "scan-build$desired_version" 2> /dev/null)"
136161

137162
export CC CXX LDFLAGS SCAN_BUILD_COMMAND
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
parameters:
2+
- name: federatedServiceConnection
3+
type: string
4+
- name: outputVariableName
5+
type: string
6+
- name: expiryInHours
7+
type: number
8+
default: 1
9+
- name: base64Encode
10+
type: boolean
11+
default: false
12+
- name: storageAccount
13+
type: string
14+
- name: container
15+
type: string
16+
- name: permissions
17+
type: string
18+
default: 'rl'
19+
20+
steps:
21+
- task: AzureCLI@2
22+
displayName: 'Generate delegation SAS Token for ${{ parameters.storageAccount }}/${{ parameters.container }}'
23+
inputs:
24+
azureSubscription: ${{ parameters.federatedServiceConnection }}
25+
scriptType: 'pscore'
26+
scriptLocation: 'inlineScript'
27+
inlineScript: |
28+
# Calculate the expiration of the SAS token and convert to UTC
29+
$expiry = (Get-Date).AddHours(${{ parameters.expiryInHours }}).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")
30+
31+
$sas = az storage container generate-sas --account-name ${{ parameters.storageAccount }} --name ${{ parameters.container }} --permissions ${{ parameters.permissions }} --expiry $expiry --auth-mode login --as-user -o tsv
32+
33+
if ($LASTEXITCODE -ne 0) {
34+
Write-Error "Failed to generate SAS token."
35+
exit 1
36+
}
37+
38+
if ('${{ parameters.base64Encode }}' -eq 'true') {
39+
$sas = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($sas))
40+
}
41+
42+
Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value"
43+
Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$sas"

global.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
}
1313
},
1414
"msbuild-sdks": {
15-
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24270.3",
16-
"Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.24270.3"
15+
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24272.5",
16+
"Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.24272.5"
1717
},
1818
"sdk": {
1919
"version": "9.0.100-preview.3.24204.13"

0 commit comments

Comments
 (0)