cgo: put temporary source files in _obj.

Fixes #1572.
Initially I tried changing things so all object
files get put in _obj, but it's too much - everything
needs changing. Perhaps some other time.

R=rsc
CC=golang-dev
https://golang.org/cl/4237050
This commit is contained in:
Roger Peppe 2011-03-02 14:22:33 -05:00 committed by Russ Cox
parent 81bfbe9333
commit 9704d4ec3d
4 changed files with 38 additions and 43 deletions

View file

@ -215,6 +215,10 @@ func main() {
fs[i] = f
}
// make sure that _obj directory exists, so that we can write
// all the output files there.
os.Mkdir("_obj", 0777)
for i, input := range goFiles {
f := fs[i]
p.Translate(f)