You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In 2fa7954, we got Android projects *building* for NativeAOT.
However, this didn't work at all on Windows.
Reviewing how NativeAOT's MSBuild targets are setup, they expect
various tooling to be available in `%PATH%`.
To fix this:
* Create a new `<SetNdkPathForIlc/>` MSBuild task.
* That simply sets the Android NDK "bin" directory to `%PATH%`.
NativeAOT apps now successfully build (and run) on Windows. I also
updated an integration test to verify this.
Unfortunately, we still have to set `$(DisableUnsupportedError)` or we
will get the message:
D:\.nuget\packages\microsoft.dotnet.ilcompiler\10.0.0-alpha.1.25067.10\build\Microsoft.NETCore.Native.Publish.targets(61,5):
error : Cross-OS native compilation is not supported. Please use the appropriate OS-specific target.
A future change might be needed here, or it might be fine to for the
Android workload to set this property:
* https://github.com/dotnet/runtime/blob/ea4a404ef8890f265780f798e7668d4710259e03/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets#L61-L62
// Microsoft.NETCore.Native.Publish.targets(61,5): Cross-OS native compilation is not supported.
113
-
// Set $(DisableUnsupportedError)=true, Microsoft.NETCore.Native.Unix.targets(296,5): error : Platform linker ('C:\Android\android-sdk\ndk\26.3.11579264\toolchains/llvm/prebuilt/windows-x86_64/bin/aarch64-linux-android21-clang++' or 'gcc') not found in PATH. Ensure you have all the required prerequisites documented at https://aka.ms/nativeaot-prerequisites.
114
-
Assert.Ignore("This test is not valid on Windows.");
0 commit comments