cgo: implement #cgo CFLAGS

This implementation is still very limited but provides a base to build
upon. Limitations:

  * CGO_CFLAGS etc is not taken into account.
  * These CFLAGS are not used in C files compiled with the package.
  * Other flags (CPPFLAGS, LDFAGS, ...) are not yet implemented.
This commit is contained in:
Ayke van Laethem
2019-11-22 11:32:57 +01:00
committed by Ron Evans
parent 6a1bb134f9
commit 10e1420237
9 changed files with 738 additions and 9 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ var flagUpdate = flag.Bool("update", false, "Update images based on test output.
func TestCGo(t *testing.T) {
var cflags = []string{"--target=armv6m-none-eabi"}
for _, name := range []string{"basic", "errors", "types"} {
for _, name := range []string{"basic", "errors", "types", "flags"} {
name := name // avoid a race condition
t.Run(name, func(t *testing.T) {
t.Parallel()