Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[CoreCLR] link app native runtime/library statically#9938

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jonathanpeppers merged 73 commits intomainfromdev/grendel/clr-host-static-link
Jul 18, 2025

Conversation

@grendello
Copy link
Contributor

@grendellogrendello commentedMar 19, 2025
edited by jonathanpeppers
Loading

This pull request introduces several enhancements to streamline runtime flavor management, improve native runtime asset handling, and support additional runtime configurations for Android builds. The changes focus on consolidating runtime flavor properties, extending native runtime asset definitions, and refining build processes for CoreCLR and Mono runtimes.

Runtime Flavor Management:

  • Configuration.props: Added_MonoRuntimeFlavorDirName and_CLRRuntimeFlavorDirName properties to centralize runtime flavor strings, reducing duplication across tools.
  • KnownProperties.cs: Introduced constants for_MonoRuntimeFlavorDirName and_CLRRuntimeFlavorDirName to ensure consistent property access.[1][2]

Native Runtime Asset Handling:

  • Microsoft.Android.Runtime.proj: Updated runtime flavor directory names to use centralized properties and added definitions for multiple native runtime assets, including debug and release variants.
  • Step_Android_SDK_NDK.cs: Added support for copying redistributable files, including CRT files, CPP ABI files, and Clang architecture-specific files, to ensure proper runtime linking.[1][2]

Build Process Enhancements:

These changes collectively improve runtime management, streamline asset handling, and enhance build configurations for Android applications targeting CoreCLR and Mono runtimes.

@grendellogrendelloforce-pushed thedev/grendel/clr-host-static-link branch 7 times, most recently frome21e634 to4e02da2CompareMarch 27, 2025 11:52
@grendellogrendelloforce-pushed thedev/grendel/clr-host-static-link branch frome15ccf6 to9026080CompareMarch 28, 2025 17:25
@grendellogrendelloforce-pushed thedev/grendel/clr-host-static-link branch 3 times, most recently from4aff532 to0b7bb8cCompareApril 2, 2025 20:47
@grendellogrendelloforce-pushed thedev/grendel/clr-host-static-link branch 3 times, most recently from96d8326 to39031e6CompareApril 14, 2025 07:07
@grendellogrendelloforce-pushed thedev/grendel/clr-host-static-link branch 5 times, most recently from7cdfb21 to86691d0CompareApril 28, 2025 07:53
jonpryor pushed a commit that referenced this pull requestApr 29, 2025
Context:#9938PR#9938 is an attempt to build `libnet-android.Debug.so` and`libnet-android.Release.so` so that CoreCLR is *statically linked* into `libnet-android*.so`.  This reduces the number of native librariesthat must be placed into the `.apk`, and allows the `.apk` to besmaller, as the native linker can remove unused code.*Note*: CoreCLR is ***not*** yet statically linked into`libnet-android*.so`.  This is *preliminary* work to support that.This iteration of static linking also requires that *all* symbols beresolvable, by requiring `lld --no-undefined` by default.  This inturn requires that we ship *copies* of `libc.so` et al, so that *all*symbols needed by `libnet-android*.so` can be resolved, includingthose from the Android NDK.Update `build-tools/xaprepare` to extract required native librariesfrom the NDK, and add those to the .NET for Android Workload packs.Update `Xamarin.Android.Build.Tasks.dll` to cleanup and refactor`ld` invocation, so that `libnet-android*.so` is built with`ld --no-undefined`.  This makes it easier to maintain and update thelinker code in the future, as well as ensures that we use consistentlinking flags across the board.Updates the LLVM IR code generator bits, also extracted from#9938,which aren't strictly related to native linking, but they are placedhere in order to make#9938 smaller.
@grendellogrendelloforce-pushed thedev/grendel/clr-host-static-link branch 2 times, most recently from96649e1 to75e6902CompareMay 6, 2025 08:49
@grendellogrendelloforce-pushed thedev/grendel/clr-host-static-link branch 3 times, most recently from29ac51a tobfc4af0CompareMay 16, 2025 10:54
@grendellogrendelloforce-pushed thedev/grendel/clr-host-static-link branch 2 times, most recently from9327572 to3ba61c3CompareMay 26, 2025 09:12
@grendellogrendello requested a review fromCopilotMay 26, 2025 12:31

This comment was marked as outdated.

grendelloand others added19 commitsJuly 15, 2025 22:20
…nts.csCo-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com>
…ts.csCo-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com>
…ts.csCo-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com>
Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com>
…veAssemblyGenerator.csCo-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com>
…veAssemblyGenerator.csCo-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com>
@grendellogrendelloforce-pushed thedev/grendel/clr-host-static-link branch from7acf14d to36196cbCompareJuly 15, 2025 20:20
@grendello
Copy link
ContributorAuthor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jonathanpeppersjonathanpeppersenabled auto-merge (squash)July 16, 2025 20:09
@jonathanpeppersjonathanpeppers merged commit2adcf2a intomainJul 18, 2025
59 checks passed
@jonathanpeppersjonathanpeppers deleted the dev/grendel/clr-host-static-link branchJuly 18, 2025 02:10
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsAug 17, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@rolfbjarnerolfbjarnerolfbjarne left review comments

Copilot code reviewCopilotCopilot left review comments

@jonathanpeppersjonathanpeppersjonathanpeppers approved these changes

+1 more reviewer

@mandel-macaquemandel-macaquemandel-macaque approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@grendello@rolfbjarne@jonathanpeppers@mandel-macaque

[8]ページ先頭

©2009-2025 Movatter.jp