corert icon indicating copy to clipboard operation
corert copied to clipboard

Cross compiling fails

Open s-arash opened this issue 7 years ago • 11 comments

Is cross compiling supported?

Reading the turorial, I got the impression that it should be supported. But I couldn't build my project for macOs or Linux on my Windows machine.

This is the error I got for Linux:

'"C:\Users\[user]\.nuget\packages\runtime.linux-x64.microsoft.dotnet.ilcompiler\1.0.0-alpha-26223-02\tools\ilc"' is not recognized as an internal or external command,
  operable program or batch file.

And I got a similar error for mac.

s-arash avatar Feb 27 '18 21:02 s-arash

Cross compiling is not supported yet.

jkotas avatar Feb 27 '18 21:02 jkotas

Ok. Thanks! Is there a timeframe for this feature?

s-arash avatar Feb 27 '18 21:02 s-arash

will the IL2CPP work when using ubuntu on windows, with a linux-64 target? what are the blockers for using IL2CPP with -r linux-64 or other platforms?

grahamehorner avatar Jan 02 '19 21:01 grahamehorner

Yes, CppCodeGen should work in Ubuntu on Windows. Note that CppCodeGen is experimental less mature option. You may have more success with using the default RyuJIT codegen.

jkotas avatar Jan 03 '19 03:01 jkotas

@jkotas Thanks, I'm looking at IL2CPP so that I may compile using a non llvm compiler for a target currently not natively supported by .NET CORE with very limited resources and therefore it won't have a runtime with JIT capability given this is RyuJIT still the better an option? am I missing something ?

grahamehorner avatar Jan 03 '19 04:01 grahamehorner

Ok, CppCodeGen is the right option for that.

jkotas avatar Jan 03 '19 04:01 jkotas

@jkotas cool wasnt sure if I missed something and if RyuJIT could be used for none llvm compiler and target other types of compilers like gcc or generate libraries

grahamehorner avatar Jan 03 '19 05:01 grahamehorner

A year later, and it's still unsupported @jkotas is it still planned to be supported or should we consider it a distant future?

QFSW avatar Jan 04 '20 22:01 QFSW

I am not aware of anybody actively working on it.

jkotas avatar Jan 05 '20 05:01 jkotas

@jkotas where would a developer start if they wanted to implement this? How does dotnet core go from VM IR to x86?

Jeffrey-P-McAteer avatar Oct 05 '20 20:10 Jeffrey-P-McAteer

We are moving this project to https://github.com/dotnet/runtimelab/tree/feature/NativeAOT . The new place is fork of dotnet/runtime repo that has the build infrastructure for cross-compilation. Getting the NativeAOT branch building for x86 would be the first step.

How does dotnet core go from VM IR to x86?

RyuJIT is used on all platforms. https://github.com/dotnet/runtime/tree/master/src/coreclr/src/jit.

jkotas avatar Oct 05 '20 21:10 jkotas