Skip to content

Migrate StripEmbeddedLibraries from ILLink step#10871

Draft
sbomer wants to merge 1 commit intomainfrom
dev/svbomer/stripembedded-inplace
Draft

Migrate StripEmbeddedLibraries from ILLink step#10871
sbomer wants to merge 1 commit intomainfrom
dev/svbomer/stripembedded-inplace

Conversation

@sbomer
Copy link
Member

@sbomer sbomer commented Mar 2, 2026

(Trying out an alternative to #10695 that should involve fewer build changes)

Port StripEmbeddedLibraries from a custom ILLink linker step to an IAssemblyModifierPipelineStep so it runs as part of the post-trim AssemblyModifierPipeline instead.

Write modified assemblies to a temp 'new/' subdirectory then immediately copy back using the same rename-to-backup pattern as MarshalMethodsAssemblyRewriter, avoiding conflicts from reading and writing assemblies in the same directory.

Strip R2R (crossgen'd) metadata before writing so Mono.Cecil can handle mixed-mode assemblies without throwing NotSupportedException.

…peline

Port StripEmbeddedLibraries from a custom ILLink linker step to an
IAssemblyModifierPipelineStep so it runs as part of the post-trim
AssemblyModifierPipeline instead.

Write modified assemblies to a temp 'new/' subdirectory then immediately
copy back using the same rename-to-backup pattern as
MarshalMethodsAssemblyRewriter, avoiding conflicts from reading and
writing assemblies in the same directory.

Strip R2R (crossgen'd) metadata before writing so Mono.Cecil can handle
mixed-mode assemblies without throwing NotSupportedException.
@sbomer sbomer self-assigned this Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant