Skip to content

Commit 2aafd9e

Browse files
nemithBryan Mills
authored and
Bryan Mills
committed
cmd/go: preserve LIBRARY_PATH and C_INCLUDE_PATH for script tests
In bespoke build environments default libraries may be specificied with LIBRARY_PATH, C_INCLUDE_PATH enviroment variables to overide the system (i.e glibc). Allow them though to allow cgo testing of these enviroments. Fixes #50985 Change-Id: I7497a7715d9b635a6ae97efaab94a7ff01cdf8e2 Reviewed-on: https://go-review.googlesource.com/c/go/+/383334 Reviewed-by: Bryan Mills <[email protected]> Run-TryBot: Bryan Mills <[email protected]> Trust: Ian Lance Taylor <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent 02224c8 commit 2aafd9e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/cmd/go/script_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ var extraEnvKeys = []string{
142142
"SYSTEMROOT", // must be preserved on Windows to find DLLs; golang.org/issue/25210
143143
"WINDIR", // must be preserved on Windows to be able to run PowerShell command; golang.org/issue/30711
144144
"LD_LIBRARY_PATH", // must be preserved on Unix systems to find shared libraries
145+
"LIBRARY_PATH", // allow override of non-standard static library paths
146+
"C_INCLUDE_PATH", // allow override non-standard include paths
145147
"CC", // don't lose user settings when invoking cgo
146148
"GO_TESTING_GOTOOLS", // for gccgo testing
147149
"GCCGO", // for gccgo testing

0 commit comments

Comments
 (0)