Commit d3a2dcf5 authored by Russ Cox's avatar Russ Cox

build: fix cgo with -j2

a b: c expands to multiple rules,
which then run in parallel.

R=r, iant
CC=golang-dev
https://golang.org/cl/2007047
parent e24910d0
......@@ -102,14 +102,11 @@ dir:
# x.cgo2.c - C implementations compiled with gcc to create a dynamic library
#
_cgo_defun.c _cgo_gotypes.go _cgo_export.c _cgo_export.h: $(CGOFILES)
_cgo_defun.c: $(CGOFILES)
CGOPKGPATH=$(dir) cgo -- $(CGO_CFLAGS) $(CGOFILES)
# Ugly but necessary
%.cgo1.go: _cgo_defun.c _cgo_gotypes.go
@true
%.cgo2.c: _cgo_defun.c _cgo_gotypes.go
_cgo_gotypes.go _cgo_export.c _cgo_export.h %.cgo1.go %.cgo2.c: _cgo_defun.c
@true
%.cgo2.o: %.cgo2.c
......
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