Skip to content

NativeAOT: Do not pass -dead_strip to the native linker #18552

Closed
@ivanpovazan

Description

@ivanpovazan

Description

As reported in: dotnet/runtime#88032 NativeAOT can produce object files which cause the native linker to seg fault during linking when -dead_strip is enabled.

This issue is reproducible with .NET8 preview 6 release: https://github.com/xamarin/xamarin-macios/tree/release/8.0.1xx-preview6 when building MAUI Podcast app with NativeAOT, resulting with build failures.

Proposal

As a workaround, do not include -dead_strip as an optimisation switch to the native linker in case of NativeAOT runtime, so we ship a more stable product in .NET8 preview 7 release

Metadata

Metadata

Assignees

Labels

bugIf an issue is a bug or a pull request a bug fix

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions