feat(cmd): add -target flag support for build commands

- Add Target flag variable to support -target parameter
- Update AddBuildFlags to include target platform option
- Enable syntax: -target platform (e.g., rp2040, wasi)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Li Jie
2025-07-26 12:05:55 +10:00
parent f571dde538
commit 0136344282

View File

@@ -13,11 +13,13 @@ func AddOutputFlags(fs *flag.FlagSet) {
var Verbose bool
var BuildEnv string
var Tags string
var Target string
func AddBuildFlags(fs *flag.FlagSet) {
fs.BoolVar(&Verbose, "v", false, "Verbose mode")
fs.StringVar(&Tags, "tags", "", "Build tags")
fs.StringVar(&BuildEnv, "buildenv", "", "Build environment")
fs.StringVar(&Target, "target", "", "Target platform (e.g., rp2040, wasi)")
}
var Gen bool