-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support building mono on x64 as it gets built on s390x #62440
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
This would be a requirement for dotnet/source-build#2596 |
Tagging subscribers to this area: @dotnet/runtime-infrastructure Issue DetailsI'd like to build this repo using mono as runtime similar to how it is built on s390x. The build script doesn't provide a way to do that. The s390x case is specially handled using Lines 28 to 31 in 1872ef5
Then subsequent checking occurs as:
cc @ViktorHofer @uweigand @omajid @akoeplinger
|
@directhex Is there much else to do other than conditionally set |
There may be some other conditionals to fix up (e.g. the stuff around building the correct coreclr subsets), but that'd the main one |
Maybe we can get rid of dotnet/source-build#2596 then is about passing The default subset for @steveisok @directhex wdyt? |
You cannot get rid of Also, we want to be able to build the full runtime (including I guess it might be possible to move building everything that is now guarded by |
I prefer working with runtime flavor and subsets rather than adding an additional flavor argument if that is possible, and I am not sure it is.
You can add it to
Maybe it is not needed to split it out completely, and it is fine that some things get built for the default |
My main concern with |
My rationale for the naming was this: while you can switch between two runtime flavors (CoreCLR and Mono), those are not actually equivalent. Rather, one of those flavors builds a lot more components than the other. Conceptually, I was thinking of those as the "primary" and "secondary" runtime flavors. Now, before my change, the "primary" flavor always was CoreCLR. What I intended to add was a way to swap those around so that on some targets, Mono can be the primary flavor. But it seems that naming convention isn't as obvious as I thought, so if you have alternative suggestions, I'd be interested ... |
If we can't express it through subsets, something that expresses: I'm building .NET with the interest of building a .NET SDK/installation. Something like |
I tried putting something together to get an idea: tmds@44d4a56. It's untested and probably has some bugs. |
Added some comments there. |
Thanks @uweigand. Your comments make sense. They need to be addressed. @ViktorHofer maybe you have some inputs? The top-level use-case is to enable building '.NET Core' but with mono runtime instead of coreclr. |
Viktor is out for a little while. Perhaps @safern can help. |
@safern We'd like to build .NET Core with mono instead of coreclr runtime. Can you give some input on how to expose this feature from the top-level build script? |
@ViktorHofer I see you're back :) Can you chime in? |
So this question is more about how the different runtimes are exposed from the build. cc @agocke @jkotas @jkoritzinsky @trylek for runtime infra The extent of my opinion here is make something that minimally captures the amount of new state you'd like to communicate, as if you were designing the interface from the start, then determine what would need to change in how the build scripts select subsets. Avoid building onto concepts that are redundant or grew organically. Background question: if someone used this flag to build the runtime would it be producing shared-framework installers and runtime-packs that include the mono runtime instead of CoreCLR -- but with the same names as the CoreCLR ones? That seems problematic since it could cause a clash of product state. I would hope that we build different things if they have different content. |
Agreed. Tbh, I can't suggest a better alternative than
For the configurations mono actively supports, the names of the runtime are different than coreclr. I believe it's only within the shared framework where the name is the same. In the past, there hasn't been a need for a mono runtime shared framework outside of running benchmarks internally. There is an issue open to change the name, but it's lower priority right now #34202. Where things would get really interesting is if we needed to deploy both runtimes in the shared framework :-) |
My 2 cents. The existing flag |
I'd rather get the feature than get stuck on the name. Is |
Is something like this all that's needed if we are sticking to diff --git a/eng/Subsets.props b/eng/Subsets.props
index 1213b5407e9..b07d643ee0f 100644
--- a/eng/Subsets.props
+++ b/eng/Subsets.props
@@ -26,8 +26,8 @@
platforms (like s390x) where only Mono is supported. The primary runtime
flavor is used to decide when to build the hosts and installers. -->
<PropertyGroup>
- <PrimaryRuntimeFlavor>CoreCLR</PrimaryRuntimeFlavor>
- <PrimaryRuntimeFlavor Condition="'$(TargetArchitecture)' == 's390x' or '$(TargetArchitecture)' == 'armv6'">Mono</PrimaryRuntimeFlavor>
+ <PrimaryRuntimeFlavor Condition="'$(PrimaryRuntimeFlavor)' == '' and ('$(TargetArchitecture)' == 's390x' or '$(TargetArchitecture)' == 'armv6')">Mono</PrimaryRuntimeFlavor>
+ <PrimaryRuntimeFlavor Condition="'$(PrimaryRuntimeFlavor)' == ''">CoreCLR</PrimaryRuntimeFlavor>
</PropertyGroup>
<PropertyGroup> |
@ericstj @safern @steveisok Looks like we just have to settle on a name and then @omajid will have the change ready. Can we settle on that soon? |
Something like that, and it would be nice if it was an argument on the top-level build.sh script. |
@safern is not working on this anymore and I'm not sure I have a voting stake here as a libraries lead. As I mentioned before I'd really like someone from the runtime team to drive this as they're more likely to have an opinion. @agocke @jkoritzinsky @hoyosjs @trylek |
@agocke @jkoritzinsky @hoyosjs @trylek any of you want to volunteer to take a look? |
Tagging subscribers to this area: @directhex Issue DetailsI'd like to build this repo using mono as runtime similar to how it is built on s390x. The build script doesn't provide a way to do that. The s390x case is specially handled using Lines 28 to 31 in 1872ef5
Then subsequent checking occurs as:
cc @ViktorHofer @uweigand @omajid @akoeplinger
|
This is Mono-specific so I think @directhex might be able to point you to someone who's more familiar that build. |
This discussion has been open since early December. Omair's 2-line patch seems to work - if I set |
Sounds great, no objections on my side either. |
aha... When I created the issue I didn't realize appending |
We now have some architectures (eg, s390x) that produce a .NET runtime that looks and feels like any other .NET runtime, except it's using Mono instead of CoreCLR under the hood. However, it's only possible to produce this Mono-based .NET runtime on a select few architectures. That makes it hard to test this set up on other architectures. Issues that affect the mono build on all architectures - such as dotnet#66594 become harder to fix and verify because of this unnecessary architecture requirement. Fix that by adding a flag to the top-level build.sh (and also to the msbuild projects) to make it possible to produce a .NET runtime with Mono on any platform. The default configuration is unchanged: we still produced CoreCLR-based .NET runtime on x64 and a Mono-based runtime on arm32,ppc64le,s390x. Fixes: dotnet#62440
We now have some architectures (eg, s390x and ppc64le) that produce a .NET runtime that looks and feels like any other .NET runtime, except it's using Mono instead of CoreCLR under the hood. However, it's only possible to produce this Mono-based .NET runtime on s390x/ppc64le. That makes it hard to test this set up on other architectures. Issues that affect the mono build on all architectures - such as #66594 become harder to fix and verify because of this unnecessary architecture requirement. Fix that by adding a flag to the top-level build.sh (and also to the msbuild projects) to make it possible to produce a .NET runtime with Mono on any platform. The default configuration is unchanged: we still produced CoreCLR-based .NET runtime on x64 and a Mono-based runtime on s390x/ppc64le. Fixes: #62440
I'd like to build this repo using mono as runtime similar to how it is built on s390x.
The build script doesn't provide a way to do that.
The s390x case is specially handled using
PrimaryRuntimeFlavor
:runtime/eng/Subsets.props
Lines 28 to 31 in 1872ef5
Then subsequent checking occurs as:
cc @ViktorHofer @uweigand @omajid @akoeplinger
The text was updated successfully, but these errors were encountered: