gccgo: wrap go binary (#207670)

This commit is contained in:
Yureka 2023-01-20 14:31:54 +01:00 committed by GitHub
parent 41d4ae90d3
commit 7a05f9de7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -264,6 +264,7 @@ stdenv.mkDerivation {
+ optionalString cc.langGo or false '' + optionalString cc.langGo or false ''
wrap ${targetPrefix}gccgo $wrapper $ccPath/${targetPrefix}gccgo wrap ${targetPrefix}gccgo $wrapper $ccPath/${targetPrefix}gccgo
wrap ${targetPrefix}go ${./go-wrapper.sh} $ccPath/${targetPrefix}go
''; '';
strictDeps = true; strictDeps = true;

View File

@ -0,0 +1,11 @@
#! @shell@
set -eu -o pipefail +o posix
shopt -s nullglob
if (( "${NIX_DEBUG:-0}" >= 7 )); then
set -x
fi
export GCCGO="@out@/bin/gccgo"
exec @prog@ "$@"