build-bazel-package: fix linkopt flags

These values were incorrect. We need to use NIX_LDFLAGS, not
NIX_LD_FLAGS. Also need to prefix all flags with -Wl, for GCC to
accept it.
This commit is contained in:
Matthew Bauer 2020-04-10 15:41:39 -04:00
parent 6ff1813318
commit 184cd9f6ff

View File

@ -181,9 +181,9 @@ in stdenv.mkDerivation (fBuildAttrs // {
done done
linkopts=() linkopts=()
host_linkopts=() host_linkopts=()
for flag in $NIX_LD_FLAGS; do for flag in $NIX_LDFLAGS; do
linkopts+=( "--linkopt=$flag" ) linkopts+=( "--linkopt=-Wl,$flag" )
host_linkopts+=( "--host_linkopt=$flag" ) host_linkopts+=( "--host_linkopt=-Wl,$flag" )
done done
BAZEL_USE_CPP_ONLY_TOOLCHAIN=1 \ BAZEL_USE_CPP_ONLY_TOOLCHAIN=1 \