Commit 7d249ef2 authored by Russ Cox's avatar Russ Cox

cmd/go: fix build -n output when using swig

$INTBITS will not be defined, of course, but that's the best we can do.

Fixes #5978.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/13253048
parent 7c6db642
...@@ -2162,6 +2162,9 @@ const i int = 1 << 32 ...@@ -2162,6 +2162,9 @@ const i int = 1 << 32
// Determine the size of int on the target system for the -intgosize option // Determine the size of int on the target system for the -intgosize option
// of swig >= 2.0.9 // of swig >= 2.0.9
func (b *builder) swigIntSize(obj string) (intsize string, err error) { func (b *builder) swigIntSize(obj string) (intsize string, err error) {
if buildN {
return "$INTBITS", nil
}
src := filepath.Join(b.work, "swig_intsize.go") src := filepath.Join(b.work, "swig_intsize.go")
if err = ioutil.WriteFile(src, []byte(swigIntSizeCode), 0644); err != nil { if err = ioutil.WriteFile(src, []byte(swigIntSizeCode), 0644); err != nil {
return return
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment