diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-03-26 16:34:05 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-03-26 16:42:22 -0700 |
| commit | 4f419d9668ee95d1a781d8540a11c6b90c06643a (patch) | |
| tree | e52e82952e27b8ee03384821edd52887502aee02 | |
| parent | 557d4346a26266d2eb13f6b0adf106b8873b0da1 (diff) | |
| download | rust-4f419d9668ee95d1a781d8540a11c6b90c06643a.tar.gz rust-4f419d9668ee95d1a781d8540a11c6b90c06643a.zip | |
rustc: Remove support for `-l foo:static`
This syntax has been renamed to `-l static=foo` some time ago.
| -rw-r--r-- | src/librustc/session/config.rs | 18 | ||||
| -rw-r--r-- | src/test/compile-fail/manual-link-bad-form.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/manual-link-bad-kind.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/manual-link-framework.rs | 2 |
4 files changed, 3 insertions, 21 deletions
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs index a7c67a08631..32070e456f4 100644 --- a/src/librustc/session/config.rs +++ b/src/librustc/session/config.rs @@ -959,24 +959,6 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options { let libs = matches.opt_strs("l").into_iter().map(|s| { let mut parts = s.splitn(1, '='); let kind = parts.next().unwrap(); - if let Some(name) = parts.next() { - let kind = match kind { - "dylib" => cstore::NativeUnknown, - "framework" => cstore::NativeFramework, - "static" => cstore::NativeStatic, - s => { - early_error(&format!("unknown library kind `{}`, expected \ - one of dylib, framework, or static", - s)); - } - }; - return (name.to_string(), kind) - } - - // FIXME(acrichto) remove this once crates have stopped using it, this - // is deprecated behavior now. - let mut parts = s.rsplitn(1, ':'); - let kind = parts.next().unwrap(); let (name, kind) = match (parts.next(), kind) { (None, name) | (Some(name), "dylib") => (name, cstore::NativeUnknown), diff --git a/src/test/compile-fail/manual-link-bad-form.rs b/src/test/compile-fail/manual-link-bad-form.rs index c251ce6a3c8..fc4fa838a56 100644 --- a/src/test/compile-fail/manual-link-bad-form.rs +++ b/src/test/compile-fail/manual-link-bad-form.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// compile-flags:-l :static +// compile-flags:-l static= // error-pattern: empty library name given via `-l` fn main() { diff --git a/src/test/compile-fail/manual-link-bad-kind.rs b/src/test/compile-fail/manual-link-bad-kind.rs index 5ab073c33bc..e9cbdb09948 100644 --- a/src/test/compile-fail/manual-link-bad-kind.rs +++ b/src/test/compile-fail/manual-link-bad-kind.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// compile-flags:-l foo:bar +// compile-flags:-l bar=foo // error-pattern: unknown library kind `bar`, expected one of dylib, framework, or static fn main() { diff --git a/src/test/compile-fail/manual-link-framework.rs b/src/test/compile-fail/manual-link-framework.rs index 96cc35049ee..97176a533d2 100644 --- a/src/test/compile-fail/manual-link-framework.rs +++ b/src/test/compile-fail/manual-link-framework.rs @@ -10,7 +10,7 @@ // ignore-macos // ignore-ios -// compile-flags:-l foo:framework +// compile-flags:-l framework=foo // error-pattern: native frameworks are only available on OSX targets fn main() { |
