runtime: config overlay

This commit is contained in:
visualfc
2025-02-06 11:02:09 +08:00
parent 1b3464b610
commit 0d218bb4b9
7 changed files with 16 additions and 9 deletions

View File

@@ -134,9 +134,9 @@ func Do(args []string, conf *Config) ([]Package, error) {
cfg.Mode |= packages.NeedForTest
}
if len(overlayFiles) > 0 {
if len(llruntime.OverlayFiles) > 0 {
cfg.Overlay = make(map[string][]byte)
for file, src := range overlayFiles {
for file, src := range llruntime.OverlayFiles {
overlay := unsafe.Slice(unsafe.StringData(src), len(src))
cfg.Overlay[filepath.Join(env.GOROOT(), "src", file)] = overlay
}