Skip to content

Commit 32d2edb

Browse files
Update dependencies from https://github.com/dotnet/arcade build 20230505.2 (#335)
[main] Update dependencies from dotnet/arcade
1 parent ad1c7e5 commit 32d2edb

File tree

7 files changed

+88
-17
lines changed

7 files changed

+88
-17
lines changed

eng/Version.Details.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<ProductDependencies>
44
</ProductDependencies>
55
<ToolsetDependencies>
6-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.23226.4">
6+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.23255.2">
77
<Uri>https://github.com/dotnet/arcade</Uri>
8-
<Sha>469dcc0cbcba5221727c8a5b9eec4a478e24a780</Sha>
8+
<Sha>5dff25b814b90abb85c847ed274cf4afb2c1b276</Sha>
99
</Dependency>
1010
</ToolsetDependencies>
1111
</Dependencies>

eng/common/cross/toolchain.cmake

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,25 @@ elseif(TARGET_ARCH_NAME STREQUAL "armv6")
6767
endif()
6868
elseif(TARGET_ARCH_NAME STREQUAL "ppc64le")
6969
set(CMAKE_SYSTEM_PROCESSOR ppc64le)
70-
set(TOOLCHAIN "powerpc64le-linux-gnu")
70+
if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/powerpc64le-alpine-linux-musl)
71+
set(TOOLCHAIN "powerpc64le-alpine-linux-musl")
72+
else()
73+
set(TOOLCHAIN "powerpc64le-linux-gnu")
74+
endif()
7175
elseif(TARGET_ARCH_NAME STREQUAL "riscv64")
7276
set(CMAKE_SYSTEM_PROCESSOR riscv64)
73-
set(TOOLCHAIN "riscv64-linux-gnu")
77+
if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/riscv64-alpine-linux-musl)
78+
set(TOOLCHAIN "riscv64-alpine-linux-musl")
79+
else()
80+
set(TOOLCHAIN "riscv64-linux-gnu")
81+
endif()
7482
elseif(TARGET_ARCH_NAME STREQUAL "s390x")
7583
set(CMAKE_SYSTEM_PROCESSOR s390x)
76-
set(TOOLCHAIN "s390x-linux-gnu")
84+
if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/s390x-alpine-linux-musl)
85+
set(TOOLCHAIN "s390x-alpine-linux-musl")
86+
else()
87+
set(TOOLCHAIN "s390x-linux-gnu")
88+
endif()
7789
elseif(TARGET_ARCH_NAME STREQUAL "x64")
7890
set(CMAKE_SYSTEM_PROCESSOR x86_64)
7991
if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/x86_64-alpine-linux-musl)
@@ -92,7 +104,11 @@ elseif(TARGET_ARCH_NAME STREQUAL "x64")
92104
endif()
93105
elseif(TARGET_ARCH_NAME STREQUAL "x86")
94106
set(CMAKE_SYSTEM_PROCESSOR i686)
95-
set(TOOLCHAIN "i686-linux-gnu")
107+
if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl)
108+
set(TOOLCHAIN "i586-alpine-linux-musl")
109+
else()
110+
set(TOOLCHAIN "i686-linux-gnu")
111+
endif()
96112
if(TIZEN)
97113
set(TIZEN_TOOLCHAIN "i586-tizen-linux-gnu/9.2.0")
98114
endif()
@@ -266,8 +282,11 @@ elseif(TARGET_ARCH_NAME MATCHES "^(arm64|x64)$")
266282
add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}")
267283
endif()
268284
elseif(TARGET_ARCH_NAME STREQUAL "x86")
285+
if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl)
286+
add_toolchain_linker_flag("--target=${TOOLCHAIN}")
287+
add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib/gcc/${TOOLCHAIN}")
288+
endif()
269289
add_toolchain_linker_flag(-m32)
270-
271290
if(TIZEN)
272291
add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
273292
add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib")
@@ -307,6 +326,9 @@ if(TARGET_ARCH_NAME MATCHES "^(arm|armel)$")
307326
add_compile_options(-mfloat-abi=softfp)
308327
endif()
309328
elseif(TARGET_ARCH_NAME STREQUAL "x86")
329+
if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl)
330+
add_compile_options(--target=${TOOLCHAIN})
331+
endif()
310332
add_compile_options(-m32)
311333
add_compile_options(-Wno-error=unused-command-line-argument)
312334
endif()

eng/common/native/init-compiler.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ if [ -z "$CLR_CC" ]; then
6464
if [ -z "$majorVersion" ]; then
6565
# note: gcc (all versions) and clang versions higher than 6 do not have minor version in file name, if it is zero.
6666
if [ "$compiler" = "clang" ]; then versions="16 15 14 13 12 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5"
67-
elif [ "$compiler" = "gcc" ]; then versions="12 11 10 9 8 7 6 5 4.9"; fi
67+
elif [ "$compiler" = "gcc" ]; then versions="13 12 11 10 9 8 7 6 5 4.9"; fi
6868

6969
for version in $versions; do
7070
_major="${version%%.*}"

eng/common/templates/job/job.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ jobs:
158158
- template: /eng/common/templates/steps/component-governance.yml
159159
parameters:
160160
${{ if eq(parameters.disableComponentGovernance, '') }}:
161-
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.runAsPublic, 'false'), or(startsWith(variables['Build.SourceBranch'], 'refs/heads/internal/release'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))) }}:
161+
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.runAsPublic, 'false'), or(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/dotnet/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/microsoft/'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))) }}:
162162
disableComponentGovernance: false
163163
${{ else }}:
164164
disableComponentGovernance: true

eng/common/tools.ps1

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,25 @@ function InstallDotNet([string] $dotnetRoot,
287287
[string] $runtimeSourceFeedKey = '',
288288
[switch] $noPath) {
289289

290+
$dotnetVersionLabel = "'sdk v$version'"
291+
292+
if ($runtime -ne '' -and $runtime -ne 'sdk') {
293+
$runtimePath = $dotnetRoot
294+
$runtimePath = $runtimePath + "\shared"
295+
if ($runtime -eq "dotnet") { $runtimePath = $runtimePath + "\Microsoft.NETCore.App" }
296+
if ($runtime -eq "aspnetcore") { $runtimePath = $runtimePath + "\Microsoft.AspNetCore.App" }
297+
if ($runtime -eq "windowsdesktop") { $runtimePath = $runtimePath + "\Microsoft.WindowsDesktop.App" }
298+
$runtimePath = $runtimePath + "\" + $version
299+
300+
$dotnetVersionLabel = "runtime toolset '$runtime/$architecture v$version'"
301+
302+
if (Test-Path $runtimePath) {
303+
Write-Host " Runtime toolset '$runtime/$architecture v$version' already installed."
304+
$installSuccess = $true
305+
Exit
306+
}
307+
}
308+
290309
$installScript = GetDotNetInstallScript $dotnetRoot
291310
$installParameters = @{
292311
Version = $version
@@ -323,18 +342,18 @@ function InstallDotNet([string] $dotnetRoot,
323342
} else {
324343
$location = "public location";
325344
}
326-
Write-Host "Attempting to install dotnet from $location."
345+
Write-Host " Attempting to install $dotnetVersionLabel from $location."
327346
try {
328347
& $installScript @variation
329348
$installSuccess = $true
330349
break
331350
}
332351
catch {
333-
Write-Host "Failed to install dotnet from $location."
352+
Write-Host " Failed to install $dotnetVersionLabel from $location."
334353
}
335354
}
336355
if (-not $installSuccess) {
337-
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install dotnet from any of the specified locations."
356+
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install $dotnetVersionLabel from any of the specified locations."
338357
ExitWithExitCode 1
339358
}
340359
}
@@ -399,7 +418,8 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
399418
# Locate Visual Studio installation or download x-copy msbuild.
400419
$vsInfo = LocateVisualStudio $vsRequirements
401420
if ($vsInfo -ne $null) {
402-
$vsInstallDir = $vsInfo.installationPath
421+
# Ensure vsInstallDir has a trailing slash
422+
$vsInstallDir = Join-Path $vsInfo.installationPath "\"
403423
$vsMajorVersion = $vsInfo.installationVersion.Split('.')[0]
404424

405425
InitializeVisualStudioEnvironmentVariables $vsInstallDir $vsMajorVersion

eng/common/tools.sh

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,35 @@ function InstallDotNetSdk {
184184
function InstallDotNet {
185185
local root=$1
186186
local version=$2
187+
local runtime=$4
188+
189+
local dotnetVersionLabel="'$runtime v$version'"
190+
if [[ -n "${4:-}" ]] && [ "$4" != 'sdk' ]; then
191+
runtimePath="$root"
192+
runtimePath="$runtimePath/shared"
193+
case "$runtime" in
194+
dotnet)
195+
runtimePath="$runtimePath/Microsoft.NETCore.App"
196+
;;
197+
aspnetcore)
198+
runtimePath="$runtimePath/Microsoft.AspNetCore.App"
199+
;;
200+
windowsdesktop)
201+
runtimePath="$runtimePath/Microsoft.WindowsDesktop.App"
202+
;;
203+
*)
204+
;;
205+
esac
206+
runtimePath="$runtimePath/$version"
207+
208+
dotnetVersionLabel="runtime toolset '$runtime/$architecture v$version'"
209+
210+
if [ -d "$runtimePath" ]; then
211+
echo " Runtime toolset '$runtime/$architecture v$version' already installed."
212+
local installSuccess=1
213+
return
214+
fi
215+
fi
187216

188217
GetDotNetInstallScript "$root"
189218
local install_script=$_GetDotNetInstallScript
@@ -228,17 +257,17 @@ function InstallDotNet {
228257
for variationName in "${variations[@]}"; do
229258
local name="$variationName[@]"
230259
local variation=("${!name}")
231-
echo "Attempting to install dotnet from $variationName."
260+
echo " Attempting to install $dotnetVersionLabel from $variationName."
232261
bash "$install_script" "${variation[@]}" && installSuccess=1
233262
if [[ "$installSuccess" -eq 1 ]]; then
234263
break
235264
fi
236265

237-
echo "Failed to install dotnet from $variationName."
266+
echo " Failed to install $dotnetVersionLabel from $variationName."
238267
done
239268

240269
if [[ "$installSuccess" -eq 0 ]]; then
241-
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install dotnet SDK from any of the specified locations."
270+
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install $dotnetVersionLabel from any of the specified locations."
242271
ExitWithExitCode 1
243272
fi
244273
}

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
}
1515
},
1616
"msbuild-sdks": {
17-
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23226.4"
17+
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23255.2"
1818
}
1919
}

0 commit comments

Comments
 (0)