about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorJonathan Turner <jonathandturner@users.noreply.github.com>2016-09-26 17:29:47 -0700
committerGitHub <noreply@github.com>2016-09-26 17:29:47 -0700
commitc816720242ac75fb4131102e4365baef20963028 (patch)
treea6d4e9fd696f1ffbcbfa57c9db2c2ebc5c9a22bc /src/rustllvm/RustWrapper.cpp
parente3ffde855a8c76dab84d5ca2e5c045538e52869a (diff)
parent2f71fa7150f9d6d9292b0a2c5f2beaf43d2058d3 (diff)
downloadrust-c816720242ac75fb4131102e4365baef20963028.tar.gz
rust-c816720242ac75fb4131102e4365baef20963028.zip
Rollup merge of #36574 - japaric:link-arg, r=alexcrichton
rustc: implement -C link-arg

this flag lets you pass a _single_ argument to the linker but can be
used _repeatedly_. For example, instead of using:

```
rustc -C link-args='-l bar' (..)
```

you could write

```
rustc -C link-arg='-l' -C link-arg='bar' (..)
```

This new flag can be used with RUSTFLAGS where `-C link-args` has
problems with "nested" spaces:

```
RUSTFLAGS='-C link-args="-Tlayout.ld -nostartfiles"'
```

This passes three arguments to rustc: `-C` `link-args="-Tlayout.ld` and
`-nostartfiles"` to `rustc`. That's not what we meant. But this does
what we want:

```
RUSTFLAGS='-C link-arg=-Tlayout.ld -C link-arg=-nostartfiles`
```

cc rust-lang/rfcs#1509

r? @alexcrichton
cc @Zoxc

This needs a test. Any suggestion?
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions