Skip to content

Commit 4f419d9

Browse files
committed
rustc: Remove support for -l foo:static
This syntax has been renamed to `-l static=foo` some time ago.
1 parent 557d434 commit 4f419d9

File tree

4 files changed

+3
-21
lines changed

4 files changed

+3
-21
lines changed

src/librustc/session/config.rs

-18
Original file line numberDiff line numberDiff line change
@@ -959,24 +959,6 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
959959
let libs = matches.opt_strs("l").into_iter().map(|s| {
960960
let mut parts = s.splitn(1, '=');
961961
let kind = parts.next().unwrap();
962-
if let Some(name) = parts.next() {
963-
let kind = match kind {
964-
"dylib" => cstore::NativeUnknown,
965-
"framework" => cstore::NativeFramework,
966-
"static" => cstore::NativeStatic,
967-
s => {
968-
early_error(&format!("unknown library kind `{}`, expected \
969-
one of dylib, framework, or static",
970-
s));
971-
}
972-
};
973-
return (name.to_string(), kind)
974-
}
975-
976-
// FIXME(acrichto) remove this once crates have stopped using it, this
977-
// is deprecated behavior now.
978-
let mut parts = s.rsplitn(1, ':');
979-
let kind = parts.next().unwrap();
980962
let (name, kind) = match (parts.next(), kind) {
981963
(None, name) |
982964
(Some(name), "dylib") => (name, cstore::NativeUnknown),

src/test/compile-fail/manual-link-bad-form.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// compile-flags:-l :static
11+
// compile-flags:-l static=
1212
// error-pattern: empty library name given via `-l`
1313

1414
fn main() {

src/test/compile-fail/manual-link-bad-kind.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// compile-flags:-l foo:bar
11+
// compile-flags:-l bar=foo
1212
// error-pattern: unknown library kind `bar`, expected one of dylib, framework, or static
1313

1414
fn main() {

src/test/compile-fail/manual-link-framework.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// ignore-macos
1212
// ignore-ios
13-
// compile-flags:-l foo:framework
13+
// compile-flags:-l framework=foo
1414
// error-pattern: native frameworks are only available on OSX targets
1515

1616
fn main() {

0 commit comments

Comments
 (0)