Fix build error for mscoree coreclr.exports (#24547)
[platform/upstream/coreclr.git] / build-packages.sh
index 80cdc45..8dfab68 100755 (executable)
@@ -113,6 +113,18 @@ done
 
 initDistroRid
 
+if [ "${__DistroRid}" = "linux-musl-arm64" ]; then
+    # ArchGroup is generally determined from parsing {}-{}; however, linux-musl-arm64
+    # will break this logic. To work around this, pass ArchGroup explicitely.
+
+    export ArchGroup=arm64
+
+    # Currently the decision tree in src/.nuget/dirs.props will incorrectly
+    # reparse the already calculated __DistroRid. For linux-musl-arm64 use
+    # the hack/hook to specifically bypass this logic.
+    export OutputRID=${__DistroRid}
+fi
+
 $__ProjectRoot/dotnet.sh msbuild /nologo /verbosity:minimal /clp:Summary \
                          /p:__BuildOS=$__BuildOS /flp:v=detailed\;Append\;LogFile=build-packages.log \
                          /l:BinClashLogger,Tools/Microsoft.DotNet.Build.Tasks.dll\;LogFile=binclash.log \