[opt] AOTAssemblyMetadataStripper保存时保持table~的id稳定

main
walon 2024-01-15 09:42:35 +08:00
parent f30e2f5b33
commit 36ca398543
1 changed files with 3 additions and 0 deletions

View File

@ -1,4 +1,5 @@
using dnlib.DotNet;
using dnlib.DotNet.Writer;
using System;
using System.Collections.Generic;
using System.IO;
@ -29,6 +30,8 @@ namespace HybridCLR.Editor.AOT
}
}
var writer = new System.IO.MemoryStream();
var options = new ModuleWriterOptions(mod);
options.MetadataOptions.Flags |= MetadataFlags.PreserveAll;
mod.Write(writer);
writer.Flush();
return writer.ToArray();