goBuildPackage: Add -x to the go build command if NIX_DEBUG >= 1
The -x go option prints all intermediate commands used by the Go compiler. For instance, this is pretty useful to debug Go LD_FLAGS because the used linker command is printed.
This commit is contained in:
parent
12949bf84a
commit
05df6d4f62
1 changed files with 4 additions and 0 deletions
|
@ -151,6 +151,10 @@ go.stdenv.mkDerivation (
|
|||
fi
|
||||
}
|
||||
|
||||
if (( "''${NIX_DEBUG:-0}" >= 1 )); then
|
||||
buildFlagsArray+=(-x)
|
||||
fi
|
||||
|
||||
if [ ''${#buildFlagsArray[@]} -ne 0 ]; then
|
||||
declare -p buildFlagsArray > $TMPDIR/buildFlagsArray
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue