From b063fc5595cf607e4016c2f0ef6fcd9d149d65d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20K=C3=A5re=20Alsaker?= Date: Tue, 23 Feb 2016 21:43:19 +0100 Subject: [PATCH 1/2] Add 0000-space-friendly-arguments.md --- text/0000-space-friendly-arguments.md | 37 +++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 text/0000-space-friendly-arguments.md diff --git a/text/0000-space-friendly-arguments.md b/text/0000-space-friendly-arguments.md new file mode 100644 index 00000000000..f2157723bb4 --- /dev/null +++ b/text/0000-space-friendly-arguments.md @@ -0,0 +1,37 @@ +- Feature Name: Space-friendly arguments +- Start Date: 2016-02-23 +- RFC PR: (leave this empty) +- Rust Issue: (leave this empty) + +# Summary +[summary]: #summary + +Add `-C link-arg` and `-C llvm-arg` command line arguments which correspond to `-C link-args` and `-C llvm-args` but takes a single argument which accepts spaces. + +# Motivation +[motivation]: #motivation + +It is common to pass paths to the linker. Paths may contain spaces and so `-C link-args` is insufficient for this. MSVC's linker also has [atleast one argument which require spaces](https://msdn.microsoft.com/en-us/library/ew0y5khy.aspx). +This would also fix [#30947](https://github.com/rust-lang/rust/issues/30947). +We don't control what arguments the linker or LLVM accepts so we shouldn't limit them to not use spaces. + +# Detailed design +[design]: #detailed-design + +We add two new arguments `-C link-arg` and `-C llvm-arg` which can be used multiple times and combined with the old `-C link-args` and `-C llvm-args`. The value passed to them represent a single argument to be passed to the linker or LLVM respectively. The order of the arguments should be preserved when passing them on. +This design corresponds to clang's with `-Xlinker ` and `-mllvm `. + +# Drawbacks +[drawbacks]: #drawbacks + +We could leave rustc crippled and avoid having multiple arguments for passing arguments. + +# Alternatives +[alternatives]: #alternatives + +None. + +# Unresolved questions +[unresolved]: #unresolved-questions + +None. \ No newline at end of file From 0de66a439ab071b56c37ea4fe3f5bd580d6e78b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20K=C3=A5re=20Alsaker?= Date: Tue, 23 Feb 2016 22:35:42 +0100 Subject: [PATCH 2/2] Prettified language --- text/0000-space-friendly-arguments.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/text/0000-space-friendly-arguments.md b/text/0000-space-friendly-arguments.md index f2157723bb4..6b4decd25a1 100644 --- a/text/0000-space-friendly-arguments.md +++ b/text/0000-space-friendly-arguments.md @@ -24,7 +24,7 @@ This design corresponds to clang's with `-Xlinker ` and `-mllvm `. # Drawbacks [drawbacks]: #drawbacks -We could leave rustc crippled and avoid having multiple arguments for passing arguments. +This results in multiple ways to pass on arguments (without spaces) to the linker and LLVM. # Alternatives [alternatives]: #alternatives