Skip to content

NativeAOT library mode on iOS-like platforms #88737

Closed
@filipnavara

Description

@filipnavara

As documented in royalapplications/beyondnet#34 (comment) there's a demand to get NativeAOT library mode working on iOS-like platforms. This is specifically for net8.0 TFM and NOT the Xamarin net8.0-ios TFM which may run into similar issues but requires fixes in the Xamarin SDK. It currently requires a couple of workaround and we should look into fixing the underlying issues:

  • Linking step doesn't use correct -sysroot/-target. We currently bundle the apps through AppleAppBuilder in dotnet/runtime, and a custom bundler in Xamarin. However, for dylib builds the NativeAOT linker step on its own is mostly sufficient. We just need to specify proper -target (eg. apple-arm64-ios11.0 or similar) and sysroot. The sysroot can be obtained through xcrun, or we can simply execute the whole linker using xcrun -sdk iphoneos clang <options> command to achieve the same result.
  • There's a conflict with the new mobile-librarybuilder-experimental workload which currently needs to be disabled with _IsAppleMobileLibraryMode=false. We should disable it automatically for NativeAOT publishing.

Metadata

Metadata

Assignees

Labels

area-NativeAOT-coreclrin-prThere is an active PR which will close this issue when it is mergedos-iosApple iOS

Type

No type

Projects

Status

No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions