Bug 1418598 - Make cargo-linker properly handle quoted strings in MOZ_CARGO_WRAP_LD and MOZ_CARGO_WRAP_LDFLAGS. r?build
--- a/build/cargo-linker
+++ b/build/cargo-linker
@@ -11,10 +11,12 @@
# we do *not* quote either MOZ_CARGO_WRAP variable:
#
# * MOZ_CARGO_WRAP_LD is equivalent to CC on Unix-y platforms, and CC
# frequently has additional arguments in addition to the compiler
# itself.
# * MOZ_CARGO_WRAP_LDFLAGS contains space-separated arguments to pass,
# and not quoting it ensures that either of those arguments is passed
# as a separate argument to the actual LD.
+#
+# $@ is doubly quoted for the eval. See bug 1418598.
-${MOZ_CARGO_WRAP_LD} ${MOZ_CARGO_WRAP_LDFLAGS} "$@"
+eval ${MOZ_CARGO_WRAP_LD} ${MOZ_CARGO_WRAP_LDFLAGS} '"$@"'