title: go build -i cause open /usr/local/go/pkg/darwin_amd64/runtime/cgo.a: permission denied
body: <p>I build my project use </p>
  
  <pre><code>go build -i -v -o ./bin/demo-api .
  </code></pre>
  
  <p>get result </p>
  
  <pre><code>go build runtime/cgo: copying /Users/hrbc/Library/Caches/go-build/63/63a132c80210b5c7b4f4ed9a902aaec712c42b15e23aa2c1b1778e2f85165d04-d: open /usr/local/go/pkg/darwin_amd64/runtime/cgo.a: permission denied
  </code></pre>
  
  <p>It work good without -i option.Is there anything I can do to resolve this problem?</p>
  
  <p>go version go1.14 darwin/amd64
  go env </p>
  
  <pre><code>GO111MODULE=""
  GOARCH="amd64"
  GOBIN=""
  GOCACHE="/Users/hrbc/Library/Caches/go-build"
  GOENV="/Users/hrbc/Library/Application Support/go/env"
  GOEXE=""
  GOFLAGS=""
  GOHOSTARCH="amd64"
  GOHOSTOS="darwin"
  GOINSECURE=""
  GONOPROXY=""
  GONOSUMDB=""
  GOOS="darwin"
  GOPATH="/Users/hrbc/go"
  GOPRIVATE=""
  GOPROXY="https://proxy.golang.org,direct"
  GOROOT="/usr/local/go"
  GOSUMDB="sum.golang.org"
  GOTMPDIR=""
  GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
  GCCGO="gccgo"
  AR="ar"
  CC="clang"
  CXX="clang++"
  CGO_ENABLED="1"
  GOMOD=""
  CGO_CFLAGS="-g -O2"
  CGO_CPPFLAGS=""
  CGO_CXXFLAGS="-g -O2"
  CGO_FFLAGS="-g -O2"
  CGO_LDFLAGS="-g -O2"
  PKG_CONFIG="pkg-config"
  GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/7n/bh7jk7s95_3gljs6gf3405k00000gn/T/go-build782113827=/tmp/go-build -gno-record-gcc-switches -fno-common"
  
  </code></pre>