-C link-args and -C llvm-args can't pass arguments with spaces
The arguments passed in -C link-args and -C llvm-args is split by spaces making it impossible to pass along paths with spaces in them.
Quoth he. ;)
Taylor Trump at 2016-01-16 03:55:02
Yes, you need quotes.
Steve Klabnik at 2016-01-26 15:38:53
What kind of quotes? Also that should be documented somewhere
Zoxc at 2016-01-26 15:56:30
Ah this is actually an issue about if you want to pass the argument
"foo bar"down to the linker you can't do that, for examplerustc -C link-args="foo bar"will pass two arguments down to the linker, firstfoothenbar.I'm going to reopen this for now, but there may not be a whole lot we can do here, as inventing our own syntax for escaping spaces is both onerous and unfortunately backwards incompatible.
Alex Crichton at 2016-01-26 15:58:13
This is also an issue when using the MSVC linker and passing /manifestdependency flags which always contain spaces such as (for example):
/manifestdependency:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'This is currently impossible.
l0calh05t at 2016-02-19 21:08:31
~~Could we accept multiple occurrences of
-C link-args=...and then accumulate them all into one space-separated collection of arguments?~~(oops, I misunderstood the problem that @alexcrichton described; my suggestion won't address that.)
Felix S Klock II at 2016-04-28 11:33:59
Triage: I agree with @alexcrichton , I'm not sure what we can do here :(
Steve Klabnik at 2018-10-31 16:32:41
Switch to
-Clink-argand-Cllvm-argwhich take only a single argument which can contain spaces. If they don't exist then they need to be implemented.Peter Atashian at 2018-11-01 05:55:38
@retep998 Seems like
-Cllvm-arghas dissapeared? Only-Cllvm-argsexists which has the space issue (in my case I am looking to omit frame pointers with--frame-pointer none)Scott Mabin at 2019-08-26 12:13:17
It didn't disappear. It simply never existed in the first place and still needs to be implemented.
Peter Atashian at 2019-08-28 06:15:50