Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

[armel] ilc utility for armel/tizen #4880

Open
sergign60 opened this issue Nov 7, 2017 · 11 comments
Open

[armel] ilc utility for armel/tizen #4880

sergign60 opened this issue Nov 7, 2017 · 11 comments

Comments

@sergign60
Copy link
Contributor

sergign60 commented Nov 7, 2017

Just now ilc is not built for armel/tizen platform so we use the old command form ./corerun ilc.dll @rsp-file while on linux x64 platform the command ./ilc @rsp-file is used.

@sergign60
Copy link
Contributor Author

@dotnet/arm32-corert-contrib

@sergign60
Copy link
Contributor Author

#4856

@sergign60
Copy link
Contributor Author

As I see we need armel/tizen version of libhostfxr.so and libhostpolicy.so also

@jkotas
Copy link
Member

jkotas commented Nov 7, 2017

I think you want to build Microsoft.NETCore.App package for tizen-armel so that dotnet new console and dotnet publish -r tizen-armel works. This package contains libhostfxr.so and libhostpolicy.so among other things.

@BredPet
Copy link
Contributor

BredPet commented Feb 14, 2018

@jkotas
I found linux-arm and tizen.4.0.0-armel runtimes for netcoreapp. linux-arm is built successfully, excluding the ObjWriter. tizen.4.0.0-armel is the problem with dependencies, some can not be satisfied. But we need something like linux-x86 for cross compile. I can't find such runtime. How can this be remedied? How can I add it?

@jkotas
Copy link
Member

jkotas commented Feb 14, 2018

we need something like linux-x86 for cross compile

.NET Core Linux x86 packages are not getting published today. You would need to build them yourself.

Alternative is to use 64-bit ILCompiler and x64 host / arm target RyuJIT. @echesakovMSFT has been doing work on RyuJIT to make this kind of cross-targeting possible (see e.g. dotnet/coreclr#15524).

@BredPet
Copy link
Contributor

BredPet commented Feb 15, 2018

@jkotas Thanks

.NET Core Linux x86 packages are not getting published today. You would need to build them yourself.

It's bad news. No any plans for x86? It's just strange that there is even an arm, arm ilc as netcoreapp, but there is no x86. The main question in this direction: how can I build x86 ilc? Or should I use the old method with corerun?

Alternative is to use 64-bit ILCompiler and x64 host / arm target RyuJIT.

As far as I remember, not so long ago everyone claimed that it was rather difficult to do, since it would take CoreCLR ton changes. Has it changed? Is it possible?
And for cross-compiling we use armelnonjit for the actual x86->armel ilc cross compilation. Should I use protononjit for x64 cross? Do I understand correctly?

@jkotas
Copy link
Member

jkotas commented Feb 15, 2018

No any plans for x86?

Linux x86 is in the list of what we would like to have. It just was not important enough to get traction and community is not pushing for it. (I know your team have done a bunch of work on it a while ago).

how can I build x86 ilc?

I think you meant where to get Linux x86 CoreCLR to run ilc on. corerun should work fine for it if you do not want to go all the way to dotnet.

As far as I remember, not so long ago everyone claimed that it was rather difficult to do, since it would take CoreCLR ton changes. Has it changed? Is it possible?

The rather difficult part is fixing up the whole (fragile) crossgen to be cross-bitness. ilc needs just the RyuJIT. Fixing RyuJIT for cross-bitness should not be that difficult.

Should I use protononjit for x64 cross?

Either way, it is a new build flavor of JIT that is not building today. I think enabling armelnonjit to build during x64 build maybe the most staightforward way to create it, but it is certainly not the only option.

@BredPet
Copy link
Contributor

BredPet commented Feb 15, 2018

@jkotas
Thanks for your explanation and advice. We'll think about this and x64 cross-build.

@jkotas
Copy link
Member

jkotas commented Feb 22, 2018

@BredPet Here is the CoreCLR issue that tracks the cross-bitness RyuJIT: https://github.com/dotnet/coreclr/issues/16513

@BredPet
Copy link
Contributor

BredPet commented Feb 27, 2018

@jkotas Thanks. I checked CoreCLR with @echesakovMSFT commits. After some changes, the ILC compilation is successful, the binaries are the same byte size. But there are some invalid instructions (it seems inherent in the broader x64 types). I think x64 cross-mode is not yet ready at all, there are still a lot of bugs. For example one of the main problems is that in the CoreCLR PAL headers - are determined architecturally dependent size_t and ptrdiff_t. Then they are used in many places of code generation.
So we decided to focus on x86 at the moment. If we have time, we will also work with x64.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants