build fix: -L dir

This commit is contained in:
xushiwei
2024-05-16 18:40:49 +08:00
parent 1675daafcd
commit fcc0e1776b
2 changed files with 2 additions and 2 deletions

View File

@@ -209,7 +209,7 @@ func buildAllPkgs(prog llssa.Program, initial []*packages.Package, mode Mode, ve
dir, lib := filepath.Split(linkFile)
command := " -l " + lib
if dir != "" {
command += " -L " + dir
command += " -L " + dir[:len(dir)-1]
}
if isSingleLinkFile(pkg.ExportFile) {
pkg.ExportFile = command + " " + pkg.ExportFile