Error with executable created with --native on Linux
I know --native is highly experimental, but brthor on gitter suggested filing an issue for this:
Linux 3.19.0-42 Ubuntu 14.04.3 LTS
Followed instructions to install dotnet from: https://dotnet.github.io/getting-started/
Created the Hello World example with 'dotnet new'.
The resulting file from using 'dotnet compile --native' works fine with the hello world example.
Changing 'Console.WriteLine("Hello World!");' to 'Console.WriteLine(100);' causes an error in the resulting file when using the --native option. It compiles just fine. But when executed it gives the following error:
ILCompiler failed generating code for this method; execution cannot continue. This is likely because of a feature that is not yet implemented in the compiler.
'Console.WriteLine(100);' compiled with just 'dotnet compile' runs without issue.
Thanks
cc @schellap
Is this expected?
Yes, this is expected, there are a few methods that haven't been brought up yet due to which we are seeing this issue:
You can see those methods by running:
dotnet compile --native --ilcargs "\\\"-verbose\\\""
I've filed issue https://github.com/dotnet/corert/issues/587
Closing this since there is an issue on dotnet/corert.