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
@ -151,6 +151,10 @@ go.stdenv.mkDerivation (
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (( "''${NIX_DEBUG:-0}" >= 1 )); then
|
||||||
|
buildFlagsArray+=(-x)
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ''${#buildFlagsArray[@]} -ne 0 ]; then
|
if [ ''${#buildFlagsArray[@]} -ne 0 ]; then
|
||||||
declare -p buildFlagsArray > $TMPDIR/buildFlagsArray
|
declare -p buildFlagsArray > $TMPDIR/buildFlagsArray
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user