@@ -129,14 +129,14 @@ func gopyRunCmdPkg(cmdr *commander.Command, args []string) error {
129129 }
130130
131131 for _ , path := range args {
132- buildPkgRecurse (cfg .OutputDir , path , path , exmap )
132+ buildPkgRecurse (cfg .OutputDir , path , path , exmap , cfg . BuildTags )
133133 }
134134 return runBuild (bind .ModePkg , cfg )
135135}
136136
137- func buildPkgRecurse (odir , path , rootpath string , exmap map [string ]struct {}) error {
137+ func buildPkgRecurse (odir , path , rootpath string , exmap map [string ]struct {}, buildTags string ) error {
138138 buildFirst := path == rootpath
139- bpkg , err := loadPackage (path , buildFirst )
139+ bpkg , err := loadPackage (path , buildFirst , buildTags )
140140 if err != nil {
141141 return fmt .Errorf ("gopy-gen: go build / load of package failed with path=%q: %v" , path , err )
142142 }
@@ -171,7 +171,7 @@ func buildPkgRecurse(odir, path, rootpath string, exmap map[string]struct{}) err
171171 continue
172172 }
173173 sp := filepath .Join (path , dr )
174- buildPkgRecurse (odir , sp , rootpath , exmap )
174+ buildPkgRecurse (odir , sp , rootpath , exmap , buildTags )
175175 }
176176 return nil
177177}
0 commit comments