Closed
Description
openedon Jan 15, 2024
Description
On 8.0 release runtime can be built with the following command without any issues:
cd runtime
./build.sh --ci -c Release --cross --arch riscv64
However there is an error on the upcoming 9.x:
error NETSDK1144: Optimizing assemblies for size failed. Optimization can be disabled by setting the PublishTrimmed property to false. [/__w/dotnet_riscv/dotnet_riscv/runtime/src/coreclr/tools/aot/crossgen2/crossgen2_publish.csproj]
@ashaurtaev, I'm not totally sure that this is related to #95188 but I were able to pass building process by using Mono by default. Sorry, not an expect of Dotnet and I don't know the relationship between Mono and Crossgen2, but this might be a kind of regression.
Reproduction Steps
./build.sh --ci -c Release --cross --arch riscv64
Expected behavior
successful build process
Actual behavior
error NETSDK1144
Regression?
No response
Known Workarounds
workaround by patching eng/Subsets.props, but that doesn’t seem correct.
--- a/eng/Subsets.props
+++ b/eng/Subsets.props
@@ -29,6 +29,7 @@
<DefaultPrimaryRuntimeFlavor>CoreCLR</DefaultPrimaryRuntimeFlavor>
<DefaultPrimaryRuntimeFlavor Condition="'$(TargetArchitecture)' == 'armv6'">Mono</DefaultPrimaryRuntimeFlavor>
<DefaultPrimaryRuntimeFlavor Condition="'$(TargetArchitecture)' == 'ppc64le'">Mono</DefaultPrimaryRuntimeFlavor>
+ <DefaultPrimaryRuntimeFlavor Condition="'$(TargetArchitecture)' == 'riscv64'">Mono</DefaultPrimaryRuntimeFlavor>
<DefaultPrimaryRuntimeFlavor Condition="'$(TargetArchitecture)' == 's390x'">Mono</DefaultPrimaryRuntimeFlavor>
<DefaultPrimaryRuntimeFlavor Condition="'$(TargetsLinuxBionic)' == 'true'">Mono</DefaultPrimaryRuntimeFlavor>
<DefaultPrimaryRuntimeFlavor Condition="'$(TargetsMobile)' == 'true'">Mono</DefaultPrimaryRuntimeFlavor>
Configuration
Docker image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-cross-riscv64
export ROOTFS_DIR=/crossrootfs/riscv64
Other information
No response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment