Skip to content

Commit be8a996

Browse files
committed
Merge branch 'feature/swift-bindings' of github.com:dotnet/runtimelab into swift-bindings/runtime-library
2 parents aa55c63 + 1da679f commit be8a996

Some content is hidden

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

44 files changed

+1794
-105
lines changed

Directory.Build.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<!-- Set this property to false if you don't want to use the runtime
1414
framework version defined in Versions.props -->
15-
<UseCustomRuntimeVersion>false</UseCustomRuntimeVersion>
15+
<UseCustomRuntimeVersion>true</UseCustomRuntimeVersion>
1616
<RuntimeFrameworkVersion Condition="$(UseCustomRuntimeVersion)">$(MicrosoftNETCoreAppVersion)</RuntimeFrameworkVersion>
1717
</PropertyGroup>
1818

eng/Version.Details.xml

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Dependencies>
33
<ToolsetDependencies>
4-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24102.4">
4+
<ProductDependencies>
5+
<!-- This VS redist package is used as a way to get a non-shipping version number
6+
when using a custom runtime version. -->
7+
<Dependency Name="VS.Redist.Common.NetCore.SharedFramework.x64.6.0" Version="6.0.0-preview.5.21226.5">
8+
<Uri>https://github.com/dotnet/runtime</Uri>
9+
<Sha>ac82799250fe42c8ba2941aef487aca94ecf04cc</Sha>
10+
</Dependency>
11+
</ProductDependencies>
12+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24165.6">
513
<Uri>https://github.com/dotnet/arcade</Uri>
6-
<Sha>2fb543a45580400a559b5ae41c96a815ea14dac5</Sha>
14+
<Sha>ace00d8719b8d1fdfd0cc05f71bb9af216338d27</Sha>
715
</Dependency>
816
</ToolsetDependencies>
917
</Dependencies>

eng/Versions.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
<XUnitVersion>2.4.1</XUnitVersion>
1717
<XUnitRunnerVisualStudioVersion>2.4.3</XUnitRunnerVisualStudioVersion>
1818
<!-- Set the custom NETCoreApp version -->
19-
<MicrosoftNETCoreAppVersion>7.0.0-preview.7.22375.6</MicrosoftNETCoreAppVersion>
19+
<MicrosoftNETCoreAppVersion>9.0.0-preview.2.24128.5</MicrosoftNETCoreAppVersion>
2020
</PropertyGroup>
2121
</Project>

eng/common/SetupNugetSources.ps1

+13-13
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Set-StrictMode -Version 2.0
3535
. $PSScriptRoot\tools.ps1
3636

3737
# Add source entry to PackageSources
38-
function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Username, $Password) {
38+
function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Username, $pwd) {
3939
$packageSource = $sources.SelectSingleNode("add[@key='$SourceName']")
4040

4141
if ($packageSource -eq $null)
@@ -48,12 +48,11 @@ function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Usern
4848
else {
4949
Write-Host "Package source $SourceName already present."
5050
}
51-
52-
AddCredential -Creds $creds -Source $SourceName -Username $Username -Password $Password
51+
AddCredential -Creds $creds -Source $SourceName -Username $Username -pwd $pwd
5352
}
5453

5554
# Add a credential node for the specified source
56-
function AddCredential($creds, $source, $username, $password) {
55+
function AddCredential($creds, $source, $username, $pwd) {
5756
# Looks for credential configuration for the given SourceName. Create it if none is found.
5857
$sourceElement = $creds.SelectSingleNode($Source)
5958
if ($sourceElement -eq $null)
@@ -82,17 +81,18 @@ function AddCredential($creds, $source, $username, $password) {
8281
$passwordElement.SetAttribute("key", "ClearTextPassword")
8382
$sourceElement.AppendChild($passwordElement) | Out-Null
8483
}
85-
$passwordElement.SetAttribute("value", $Password)
84+
85+
$passwordElement.SetAttribute("value", $pwd)
8686
}
8787

88-
function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Username, $Password) {
88+
function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Username, $pwd) {
8989
$maestroPrivateSources = $Sources.SelectNodes("add[contains(@key,'darc-int')]")
9090

9191
Write-Host "Inserting credentials for $($maestroPrivateSources.Count) Maestro's private feeds."
9292

9393
ForEach ($PackageSource in $maestroPrivateSources) {
9494
Write-Host "`tInserting credential for Maestro's feed:" $PackageSource.Key
95-
AddCredential -Creds $creds -Source $PackageSource.Key -Username $Username -Password $Password
95+
AddCredential -Creds $creds -Source $PackageSource.Key -Username $Username -pwd $pwd
9696
}
9797
}
9898

@@ -144,13 +144,13 @@ if ($disabledSources -ne $null) {
144144
$userName = "dn-bot"
145145

146146
# Insert credential nodes for Maestro's private feeds
147-
InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Username $userName -Password $Password
147+
InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Username $userName -pwd $Password
148148

149149
# 3.1 uses a different feed url format so it's handled differently here
150150
$dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']")
151151
if ($dotnet31Source -ne $null) {
152-
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
153-
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
152+
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username $userName -pwd $Password
153+
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -pwd $Password
154154
}
155155

156156
$dotnetVersions = @('5','6','7','8')
@@ -159,9 +159,9 @@ foreach ($dotnetVersion in $dotnetVersions) {
159159
$feedPrefix = "dotnet" + $dotnetVersion;
160160
$dotnetSource = $sources.SelectSingleNode("add[@key='$feedPrefix']")
161161
if ($dotnetSource -ne $null) {
162-
AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
163-
AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
162+
AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal/nuget/v2" -Creds $creds -Username $userName -pwd $Password
163+
AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal-transport/nuget/v2" -Creds $creds -Username $userName -pwd $Password
164164
}
165165
}
166166

167-
$doc.Save($filename)
167+
$doc.Save($filename)

eng/common/build.ps1

-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ function Build {
125125
/p:Test=$test `
126126
/p:Pack=$pack `
127127
/p:DotNetBuildRepo=$($productBuild -or $verticalBuild) `
128-
/p:ArcadeBuildVertical=$verticalBuild `
129128
/p:IntegrationTest=$integrationTest `
130129
/p:PerformanceTest=$performanceTest `
131130
/p:Sign=$sign `

eng/common/build.sh

-1
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@ function Build {
241241
/p:DotNetBuildRepo=$product_build \
242242
/p:ArcadeBuildFromSource=$source_build \
243243
/p:DotNetBuildSourceOnly=$source_build \
244-
/p:ArcadeBuildVertical=$vertical_build \
245244
/p:Rebuild=$rebuild \
246245
/p:Test=$test \
247246
/p:Pack=$pack \

eng/common/native/init-compiler.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ if [ -z "$CLR_CC" ]; then
6363
# Set default versions
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.
66-
if [ "$compiler" = "clang" ]; then versions="17 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"
66+
if [ "$compiler" = "clang" ]; then versions="18 17 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"
6767
elif [ "$compiler" = "gcc" ]; then versions="13 12 11 10 9 8 7 6 5 4.9"; fi
6868

6969
for version in $versions; do
@@ -125,8 +125,8 @@ if [ -z "$CC" ]; then
125125
exit 1
126126
fi
127127

128-
# Only lld version >= 9 can be considered stable. lld doesn't support s390x.
129-
if [ "$compiler" = "clang" ] && [ -n "$majorVersion" ] && [ "$majorVersion" -ge 9 ] && [ "$build_arch" != "s390x" ]; then
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
130130
if "$CC" -fuse-ld=lld -Wl,--version >/dev/null 2>&1; then
131131
LDFLAGS="-fuse-ld=lld"
132132
fi

eng/common/native/init-distro-rid.sh

+38-42
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/bin/sh
22

33
# getNonPortableDistroRid
44
#
@@ -11,67 +11,66 @@
1111
# non-portable rid
1212
getNonPortableDistroRid()
1313
{
14-
local targetOs="$1"
15-
local targetArch="$2"
16-
local rootfsDir="$3"
17-
local nonPortableRid=""
14+
targetOs="$1"
15+
targetArch="$2"
16+
rootfsDir="$3"
17+
nonPortableRid=""
1818

1919
if [ "$targetOs" = "linux" ]; then
20+
# shellcheck disable=SC1091
2021
if [ -e "${rootfsDir}/etc/os-release" ]; then
21-
source "${rootfsDir}/etc/os-release"
22-
23-
if [[ "${ID}" == "rhel" || "${ID}" == "rocky" || "${ID}" == "alpine" ]]; then
24-
# remove the last version digit
25-
VERSION_ID="${VERSION_ID%.*}"
22+
. "${rootfsDir}/etc/os-release"
23+
if [ "${ID}" = "rhel" ] || [ "${ID}" = "rocky" ] || [ "${ID}" = "alpine" ]; then
24+
VERSION_ID="${VERSION_ID%.*}" # Remove the last version digit for these distros
2625
fi
2726

28-
if [[ "${VERSION_ID:-}" =~ ^([[:digit:]]|\.)+$ ]]; then
27+
if echo "${VERSION_ID:-}" | grep -qE '^([[:digit:]]|\.)+$'; then
2928
nonPortableRid="${ID}.${VERSION_ID}-${targetArch}"
3029
else
3130
# Rolling release distros either do not set VERSION_ID, set it as blank or
3231
# set it to non-version looking string (such as TEMPLATE_VERSION_ID on ArchLinux);
3332
# so omit it here to be consistent with everything else.
3433
nonPortableRid="${ID}-${targetArch}"
3534
fi
36-
3735
elif [ -e "${rootfsDir}/android_platform" ]; then
38-
source "$rootfsDir"/android_platform
36+
# shellcheck disable=SC1091
37+
. "${rootfsDir}/android_platform"
3938
nonPortableRid="$RID"
4039
fi
4140
fi
4241

4342
if [ "$targetOs" = "freebsd" ]; then
44-
# $rootfsDir can be empty. freebsd-version is shell script and it should always work.
45-
__freebsd_major_version=$($rootfsDir/bin/freebsd-version | { read v; echo "${v%%.*}"; })
43+
# $rootfsDir can be empty. freebsd-version is a shell script and should always work.
44+
__freebsd_major_version=$("$rootfsDir"/bin/freebsd-version | cut -d'.' -f1)
4645
nonPortableRid="freebsd.$__freebsd_major_version-${targetArch}"
47-
elif command -v getprop && getprop ro.product.system.model 2>&1 | grep -qi android; then
46+
elif command -v getprop >/dev/null && getprop ro.product.system.model | grep -qi android; then
4847
__android_sdk_version=$(getprop ro.build.version.sdk)
4948
nonPortableRid="android.$__android_sdk_version-${targetArch}"
5049
elif [ "$targetOs" = "illumos" ]; then
5150
__uname_version=$(uname -v)
5251
case "$__uname_version" in
5352
omnios-*)
54-
__omnios_major_version=$(echo "${__uname_version:8:2}")
55-
nonPortableRid=omnios."$__omnios_major_version"-"$targetArch"
56-
;;
53+
__omnios_major_version=$(echo "$__uname_version" | cut -c9-10)
54+
nonPortableRid="omnios.$__omnios_major_version-${targetArch}"
55+
;;
5756
joyent_*)
58-
__smartos_major_version=$(echo "${__uname_version:7:4}")
59-
nonPortableRid=smartos."$__smartos_major_version"-"$targetArch"
60-
;;
61-
illumos_*)
62-
nonPortableRid=openindiana-"$targetArch"
63-
;;
57+
__smartos_major_version=$(echo "$__uname_version" | cut -c9-10)
58+
nonPortableRid="smartos.$__smartos_major_version-${targetArch}"
59+
;;
60+
*)
61+
nonPortableRid="illumos-${targetArch}"
62+
;;
6463
esac
6564
elif [ "$targetOs" = "solaris" ]; then
6665
__uname_version=$(uname -v)
67-
__solaris_major_version=$(echo "${__uname_version%.*}")
68-
nonPortableRid=solaris."$__solaris_major_version"-"$targetArch"
66+
__solaris_major_version=$(echo "$__uname_version" | cut -d'.' -f1)
67+
nonPortableRid="solaris.$__solaris_major_version-${targetArch}"
6968
elif [ "$targetOs" = "haiku" ]; then
70-
__uname_release=$(uname -r)
69+
__uname_release="$(uname -r)"
7170
nonPortableRid=haiku.r"$__uname_release"-"$targetArch"
7271
fi
7372

74-
echo "$(echo $nonPortableRid | tr '[:upper:]' '[:lower:]')"
73+
echo "$nonPortableRid" | tr '[:upper:]' '[:lower:]'
7574
}
7675

7776
# initDistroRidGlobal
@@ -85,26 +84,23 @@ getNonPortableDistroRid()
8584
# None
8685
#
8786
# Notes:
88-
#
89-
# It is important to note that the function does not return anything, but it
90-
# exports the following variables on success:
91-
#
92-
# __DistroRid : Non-portable rid of the target platform.
93-
# __PortableTargetOS : OS-part of the portable rid that corresponds to the target platform.
94-
#
87+
# It is important to note that the function does not return anything, but it
88+
# exports the following variables on success:
89+
# __DistroRid : Non-portable rid of the target platform.
90+
# __PortableTargetOS : OS-part of the portable rid that corresponds to the target platform.
9591
initDistroRidGlobal()
9692
{
97-
local targetOs="$1"
98-
local targetArch="$2"
99-
local rootfsDir=""
100-
if [ "$#" -ge 3 ]; then
93+
targetOs="$1"
94+
targetArch="$2"
95+
rootfsDir=""
96+
if [ $# -ge 3 ]; then
10197
rootfsDir="$3"
10298
fi
10399

104100
if [ -n "${rootfsDir}" ]; then
105101
# We may have a cross build. Check for the existence of the rootfsDir
106102
if [ ! -e "${rootfsDir}" ]; then
107-
echo "Error rootfsDir has been passed, but the location is not valid."
103+
echo "Error: rootfsDir has been passed, but the location is not valid."
108104
exit 1
109105
fi
110106
fi
@@ -119,7 +115,7 @@ initDistroRidGlobal()
119115
STRINGS="$(command -v llvm-strings || true)"
120116
fi
121117

122-
# Check for musl-based distros (e.g Alpine Linux, Void Linux).
118+
# Check for musl-based distros (e.g. Alpine Linux, Void Linux).
123119
if "${rootfsDir}/usr/bin/ldd" --version 2>&1 | grep -q musl ||
124120
( [ -n "$STRINGS" ] && "$STRINGS" "${rootfsDir}/usr/bin/ldd" 2>&1 | grep -q musl ); then
125121
__PortableTargetOS="linux-musl"

eng/common/native/init-os-and-arch.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/bin/sh
22

33
# Use uname to determine what the OS is.
44
OSName=$(uname -s | tr '[:upper:]' '[:lower:]')
@@ -35,6 +35,10 @@ fi
3535
case "$CPUName" in
3636
arm64|aarch64)
3737
arch=arm64
38+
if [ "$(getconf LONG_BIT)" -lt 64 ]; then
39+
# This is 32-bit OS running on 64-bit CPU (for example Raspberry Pi OS)
40+
arch=arm
41+
fi
3842
;;
3943

4044
loongarch64)
@@ -50,6 +54,7 @@ case "$CPUName" in
5054
;;
5155

5256
armv7l|armv8l)
57+
# shellcheck disable=SC1091
5358
if (NAME=""; . /etc/os-release; test "$NAME" = "Tizen"); then
5459
arch=armel
5560
else

eng/common/post-build/publish-using-darc.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ param(
1212
try {
1313
. $PSScriptRoot\post-build-utils.ps1
1414

15-
$darc = Get-Darc
15+
$darc = Get-Darc
1616

1717
$optionalParams = [System.Collections.ArrayList]::new()
1818

@@ -46,7 +46,7 @@ try {
4646
}
4747

4848
Write-Host 'done.'
49-
}
49+
}
5050
catch {
5151
Write-Host $_
5252
Write-PipelineTelemetryError -Category 'PromoteBuild' -Message "There was an error while trying to publish build '$BuildId' to default channels."

0 commit comments

Comments
 (0)