Open Zoxc opened 8 years ago
Quoth he. ;)
Yes, you need quotes.
What kind of quotes? Also that should be documented somewhere
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 example rustc -C link-args="foo bar"
will pass two arguments down to the linker, first foo
then bar
.
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.
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.
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.)
Triage: I agree with @alexcrichton , I'm not sure what we can do here :(
Switch to -Clink-arg
and -Cllvm-arg
which take only a single argument which can contain spaces. If they don't exist then they need to be implemented.
@retep998 Seems like -Cllvm-arg
has dissapeared? Only -Cllvm-args
exists which has the space issue (in my case I am looking to omit frame pointers with --frame-pointer none
)
It didn't disappear. It simply never existed in the first place and still needs to be implemented.
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.