about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-10-20 23:04:16 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-10-30 19:02:11 -0700
commit8e6e846d8a26e5a9d3aafd0bdcc18ed3ddf0cbca (patch)
treeff3fe4dcde12737779340473a75f5e121d28b485 /src/rustllvm/RustWrapper.cpp
parentfd53657484d78d0b7c00ce3264d99c051cf07d26 (diff)
downloadrust-8e6e846d8a26e5a9d3aafd0bdcc18ed3ddf0cbca.tar.gz
rust-8e6e846d8a26e5a9d3aafd0bdcc18ed3ddf0cbca.zip
rustc: Implement -l and include! tweaks
This is an implementation of the rustc bits of [RFC 403][rfc]. This adds a new
flag to the compiler, `-l`, as well as tweaking the `include!` macro (and
related source-centric macros).

The compiler's new `-l` flag is used to link libraries in from the command line.
This flag stacks with `#[link]` directives already found in the program. The
purpose of this flag, also stated in the RFC, is to ease linking against native
libraries which have wildly different requirements across platforms and even
within distributions of one platform. This flag accepts a string of the form
`NAME[:KIND]` where `KIND` is optional or one of dylib, static, or framework.
This is roughly equivalent to if the equivalent `#[link]` directive were just
written in the program.

The `include!` macro has been modified to recursively expand macros to allow
usage of `concat!` as an argument, for example. The use case spelled out in RFC
403 was for `env!` to be used as well to include compile-time generated files.
The macro also received a bit of tweaking to allow it to expand to either an
expression or a series of items, depending on what context it's used in.

[rfc]: https://github.com/rust-lang/rfcs/pull/403
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions