cmd/gomobile: error when attempting to bind main package
Fixes golang/go#15515 Change-Id: Idc831d4691f6c983d37622bb30c238015542cfdf Reviewed-on: https://go-review.googlesource.com/22802 Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
parent
c435d0bad5
commit
2922272407
|
@ -97,6 +97,13 @@ func runBind(cmd *command) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check if any of the package is main
|
||||||
|
for _, pkg := range pkgs {
|
||||||
|
if pkg.Name == "main" {
|
||||||
|
return fmt.Errorf("binding 'main' package (%s) is not supported", pkg.ImportComment)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch targetOS {
|
switch targetOS {
|
||||||
case "android":
|
case "android":
|
||||||
return goAndroidBind(pkgs, targetArchs)
|
return goAndroidBind(pkgs, targetArchs)
|
||||||
|
|
Loading…
Reference in New Issue