fix(build): handle args order properly

This commit is contained in:
Erica Marigold 2024-07-19 22:44:49 +05:30
parent 1ab459e2f9
commit 0884e8d7c0
No known key found for this signature in database
GPG key ID: 2768CC0C23D245D1

View file

@ -76,8 +76,11 @@ func main() {
buildTags = append(buildTags, []string{"-tags", strings.Join(features, ",")}...)
}
subcommand := goArgs[0]
goArgs = goArgs[1:]
combinedArgs := append(buildTags, goArgs...)
cmd, _, _, _ := Command("go").
WithArgs(append(buildTags, goArgs...)...).
WithArgs(append([]string{subcommand}, combinedArgs...)...).
WithVar(
"CGO_LDFLAGS",
fmt.Sprintf("-L %s -lLuau.VM -lm -lstdc++", artifactDir),