-
Notifications
You must be signed in to change notification settings - Fork 5k
Bring up android+coreclr windows build. #112256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ndroidAppBuilder trying to build the sample
Tagging subscribers to this area: @hoyosjs |
@kotlarmilos @ivanpovazan the Android sample app goes through the appbuilder to the point where it invokes cmake. It'll fail because cmake isn't usually on PATH by itself. There is probably some pathing nonsense to fix as well. |
afaik we handle that in the runtime build itself by invoking the VsDevCmd.bat (Developer Command Prompt for Visual Studio) through init-vs-env.cmd which will bring the cmake included in VS into PATH. I think it's fine if we document you need to run from Developer Command Prompt or have cmake in PATH for now so we don't need to complicate appbuilder (we basically have the same requirement of having cmake in PATH on the other platforms anyway) |
This is ready... Cleanup suggestions and pointing out nits would be appreciated. |
Co-authored-by: Jeremy Koritzinsky <jkoritzinsky@gmail.com>
* main: [Android] Run CoreCLR functional tests on Android (dotnet#112283) [LoongArch64] Fix some assertion failures for Debug ILC building Debug NativeAOT testcases. (dotnet#112229) Fix suspicious code fragments (dotnet#112384) `__ComObject` doesn't support dynamic interface map (dotnet#112375) Native DLLs: only load imported DLLs from System32 (dotnet#112359) [main] Update dependencies from dotnet/roslyn (dotnet#112314) Update SVE instructions that writes to GC regs (dotnet#112389) Bring up android+coreclr windows build. (dotnet#112256) Never use heap for return buffers (dotnet#112060) Wait to complete the test before releasing the agile reference. (dotnet#112387) Prevent returning disposed HTTP/1.1 connections to the pool (dotnet#112383) Fingerprint dotnet.js if writing import map to html is enabled (dotnet#112407) Remove duplicate definition of CORECLR_HOSTING_API_LINKAGE (dotnet#112096) Update the exception message to reflect current behavior. (dotnet#112355) Use enum for frametype not v table (dotnet#112166) Enable AltJits build for LoongArch64 and RiscV64 (dotnet#110282) Guard members of MonoType union & fix related bugs (dotnet#111645) Add optional hooks for debugging OpenSSL memory allocations (dotnet#111539) JIT: Optimize struct parameter register accesses in the backend (dotnet#110819) NativeAOT: Cover more opcodes in type preinitializer (dotnet#112073)
@@ -15,6 +15,9 @@ | |||
<EnableDefaultAssembliesToBundle>true</EnableDefaultAssembliesToBundle> | |||
<!-- With Mono AOT on Android we default to not using AOT data file optimization as it can degrade runtime performance for small binary size improvements. --> | |||
<_UseAotDataFile Condition="'$(RunAOTCompilation)' == 'true'">false</_UseAotDataFile> | |||
<RepoDotnet Condition="'$(DOTNET_ROOT)' != ''">$(DOTNET_ROOT)/dotnet</RepoDotnet> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need this, you can just always call dotnet.cmd/dotnet.sh right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's unnecessary
Partial revert of dotnet#112256
if /i not "%__HostOS%" == "%__TargetOS%" ( | ||
if /i "%__HostOS%" == "" ( | ||
set __ExtraCmakeArgs=!__ExtraCmakeArgs! "-DCLR_CMAKE_TARGET_ARCH=%__TargetArch%" "-DCLR_CMAKE_TARGET_OS=%__TargetOS%" | ||
) | ||
) | ||
|
||
set __ExtraCmakeArgs=!__ExtraCmakeArgs! "-DCLI_CMAKE_FALLBACK_OS=%__HostFallbackOS%" "-DCLR_CMAKE_PGO_INSTRUMENT=%__PgoInstrument%" "-DCLR_CMAKE_OPTDATA_PATH=%__PgoOptDataPath%" "-DCLR_CMAKE_PGO_OPTIMIZE=%__PgoOptimize%" | ||
|
||
if /i "%__TargetOS%" == "android" ( | ||
if not "%__HostOS%" == "" ( | ||
set "__TargetOS=!__HostOS!" | ||
) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes broke build of windows arm64-targeting x64-hosted crossdac (the build produces x64-targeting x64-hosted crossdac instead).
dotnet#112256 added the ability to cross compile android on windows. This regressed the win-arm64 crossdac build because it stopped passing CMAKE_TARGET_ARCH and CMAKE_TARGET_OS for cross component builds where the host and target os's match. This change makes sure the cmake variables are passed in all cases except when the hostos isn't passed in or is windows (host == target).
After dotnet#112256 landed, there was a change to zip the test assets using `ZipFile.CreateFromDirectory` for cross platform support. This regressed `unzipAssets` in `MonoRunner.java` because it naivley assumed that directories would come before files in the zip archive. This change fixes the problem by making sure directories are created first before writing files to disk. Fixes dotnet#112558
…12654) After #112256 landed, there was a change to zip the test assets using `ZipFile.CreateFromDirectory` for cross platform support. This regressed `unzipAssets` in `MonoRunner.java` because it naivley assumed that directories would come before files in the zip archive. This change fixes the problem by making sure directories are created first before writing files to disk. Fixes #112558
#112256 added the ability to cross compile android on windows. This regressed the win-arm64 crossdac build because it stopped passing CMAKE_TARGET_ARCH and CMAKE_TARGET_OS for cross component builds where the host and target os's match. This change makes sure the cmake variables are passed in all cases.
This pull request includes various changes to improve the build process for Android and cross-compiling on Windows. The most important changes include updates to build scripts, configuration files, and the addition of new scripts.
A side benefit of this change is that it sets the table for being able to cross compile other non-Windows configurations on Windows.