llgo build/install/run: SkipArgs bugfix

This commit is contained in:
xushiwei
2024-04-27 06:39:09 +08:00
parent ea8ddc6451
commit 3cc83b8ec4
4 changed files with 82 additions and 30 deletions

View File

@@ -25,8 +25,15 @@ import (
"golang.org/x/tools/go/packages"
)
var (
// TODO(xsw): complete clean flags
cleanFlags = map[string]bool{
"-v": false, // -v: print the paths of packages as they are clean
}
)
func Clean(args []string, conf *Config) {
flags, patterns, verbose := parseArgs(args)
flags, patterns, verbose := ParseArgs(args, cleanFlags)
cfg := &packages.Config{
Mode: loadSyntax | packages.NeedExportFile,
BuildFlags: flags,