1
0
mirror of https://github.com/golang/go synced 2024-11-08 19:26:14 -07:00
go/misc/cgo
KJ Tsanaktsidis 786120b55d cmd/cgo: document #include <> search path behaviour
cgo effectively prepends -I${SRCDIR} to the header include path of all
preambles it processes, so when an #include <> matches a header file
both in the source directory and also another include directory, the
local copy will be used in preference.

This behaviour is surprising but unfortunately also longstanding and
relied upon by packages in the wild, so the best we can do is to
document it.

Fixes #41059

Change-Id: If6d2818294b2bd94ea0fe5fd6ce77e54b3e167a6
Reviewed-on: https://go-review.googlesource.com/c/go/+/251758
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-09-01 23:12:18 +00:00
..
errors
fortran
gmp
life
nocgo
stdio
test cmd/cgo: document #include <> search path behaviour 2020-09-01 23:12:18 +00:00
testasan
testcarchive
testcshared
testgodefs cmd/cgo: in -godefs mode, don't change constant to type 2020-06-11 21:53:45 +00:00
testplugin misc/cgo/testplugin: fix typo in comment 2020-06-01 23:25:14 +00:00
testsanitizers
testshared cmd/link: don't mark shared library symbols reachable unconditionally 2020-07-27 16:04:55 +00:00
testsigfwd
testso
testsovar
testtls