aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/api')
-rw-r--r--src/cmd/api/goapi.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cmd/api/goapi.go b/src/cmd/api/goapi.go
index 7102e9d409..a62c874210 100644
--- a/src/cmd/api/goapi.go
+++ b/src/cmd/api/goapi.go
@@ -145,6 +145,10 @@ func main() {
// going to change w/o a language change.
// - We don't care about the API of commands.
if name != "unsafe" && !strings.HasPrefix(name, "cmd/") {
+ if name == "runtime/cgo" && !context.CgoEnabled {
+ // w.Import(name) will return nil
+ continue
+ }
w.export(w.Import(name))
}
}