Bug 1418598 - Make cargo-linker properly handle quoted strings in MOZ_CARGO_WRAP_LD and MOZ_CARGO_WRAP_LDFLAGS. r=ted
authorMike Hommey <mh+mozilla@glandium.org>
Sat, 18 Nov 2017 20:24:12 +0900
changeset 392791 69465fa861e14da6b903ec4f154abf355e5d6d79
parent 392790 409cb807a665e5231d8370d2d2c42852d5d2c0e9
child 392792 a2c34dc1f3eb69a16d8a8f1f2c211ec0d9ec575c
push id97527
push usertoros@mozilla.com
push dateTue, 21 Nov 2017 10:20:05 +0000
treeherdermozilla-inbound@60d0f3ee0c43 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs1418598
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1418598 - Make cargo-linker properly handle quoted strings in MOZ_CARGO_WRAP_LD and MOZ_CARGO_WRAP_LDFLAGS. r=ted
build/cargo-linker
--- 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} '"$@"'