]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: add -include to cgo whitelist
authorDave Pifke <dave@pifke.org>
Thu, 2 Jul 2020 00:48:37 +0000 (00:48 +0000)
committerIan Lance Taylor <iant@golang.org>
Wed, 28 Oct 2020 00:49:40 +0000 (00:49 +0000)
Fixes #39988.

Change-Id: Ia6f5b73e6508f27e3badbcbd29dbeadffd55a932
Reviewed-on: https://go-review.googlesource.com/c/go/+/240739
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/go/internal/work/security.go
src/cmd/go/internal/work/security_test.go

index d2a2697f0fd51e8de3234e19fa04cb0181a8daa5..bcc29c8cbe161728579cc72efeaaf49286520f24 100644 (file)
@@ -132,6 +132,7 @@ var validCompilerFlagsWithNextArg = []string{
        "-U",
        "-I",
        "-framework",
+       "-include",
        "-isysroot",
        "-isystem",
        "--sysroot",
index 11e74f29c6a6a7f94c6eec7bb403537a726f762e..43a0ab1e4767a3238dca8d6490be0a95181017a5 100644 (file)
@@ -62,6 +62,8 @@ var goodCompilerFlags = [][]string{
        {"-I", "=/usr/include/libxml2"},
        {"-I", "dir"},
        {"-I", "$SYSROOT/dir"},
+       {"-isystem", "/usr/include/mozjs-68"},
+       {"-include", "/usr/include/mozjs-68/RequiredDefines.h"},
        {"-framework", "Chocolate"},
        {"-x", "c"},
        {"-v"},
@@ -91,6 +93,7 @@ var badCompilerFlags = [][]string{
        {"-I", "@foo"},
        {"-I", "-foo"},
        {"-I", "=@obj"},
+       {"-include", "@foo"},
        {"-framework", "-Caffeine"},
        {"-framework", "@Home"},
        {"-x", "--c"},