dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.03k stars 4.67k forks source link

System.Native: eng/native/tryrun.cmake host/target confusion #89039

Open lambdageek opened 1 year ago

lambdageek commented 1 year ago

When doing an android-x86 build on an osx-arm64 machine, during ./build.sh --os android -arch x86, we end up here during the System.Native build

https://github.com/dotnet/runtime/blob/f83580df1d7160fd8fef3a9658643e0e6fe7ccfc/eng/native/tryrun.cmake#L90

This is the else case for

https://github.com/dotnet/runtime/blob/f83580df1d7160fd8fef3a9658643e0e6fe7ccfc/eng/native/tryrun.cmake#L50-L51

This seems wrong - DARWIN is the host machine (osx-arm64), arm64|x64 is checking the target architecture

lambdageek commented 1 year ago

Note that ./build.sh --os android -arch x86 will fail earlier, during the mono build, unless you include https://github.com/dotnet/runtime/pull/89027

but after that it's an eng/native/tryrun.cmake problem

lambdageek commented 1 year ago

cc @directhex

lewing commented 1 month ago

@akoeplinger what work is left here?