Merge pull request #1214 from luoliwoshang/emb/esp32/tag
internal/build:include target build-tags in Go package compilation
This commit is contained in:
@@ -170,6 +170,9 @@ func Do(args []string, conf *Config) ([]Package, error) {
|
|||||||
if conf.Tags != "" {
|
if conf.Tags != "" {
|
||||||
tags += "," + conf.Tags
|
tags += "," + conf.Tags
|
||||||
}
|
}
|
||||||
|
if len(export.BuildTags) > 0 {
|
||||||
|
tags += "," + strings.Join(export.BuildTags, ",")
|
||||||
|
}
|
||||||
cfg := &packages.Config{
|
cfg := &packages.Config{
|
||||||
Mode: loadSyntax | packages.NeedDeps | packages.NeedModule | packages.NeedExportFile,
|
Mode: loadSyntax | packages.NeedDeps | packages.NeedModule | packages.NeedExportFile,
|
||||||
BuildFlags: []string{"-tags=" + tags},
|
BuildFlags: []string{"-tags=" + tags},
|
||||||
|
|||||||
Reference in New Issue
Block a user