rustc: Remove support for -l foo:static
This syntax has been renamed to `-l static=foo` some time ago.
This commit is contained in:
parent
557d4346a2
commit
4f419d9668
4 changed files with 3 additions and 21 deletions
|
@ -959,24 +959,6 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
|
||||||
let libs = matches.opt_strs("l").into_iter().map(|s| {
|
let libs = matches.opt_strs("l").into_iter().map(|s| {
|
||||||
let mut parts = s.splitn(1, '=');
|
let mut parts = s.splitn(1, '=');
|
||||||
let kind = parts.next().unwrap();
|
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) {
|
let (name, kind) = match (parts.next(), kind) {
|
||||||
(None, name) |
|
(None, name) |
|
||||||
(Some(name), "dylib") => (name, cstore::NativeUnknown),
|
(Some(name), "dylib") => (name, cstore::NativeUnknown),
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
// compile-flags:-l :static
|
// compile-flags:-l static=
|
||||||
// error-pattern: empty library name given via `-l`
|
// error-pattern: empty library name given via `-l`
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// 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
|
// error-pattern: unknown library kind `bar`, expected one of dylib, framework, or static
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
// ignore-macos
|
// ignore-macos
|
||||||
// ignore-ios
|
// ignore-ios
|
||||||
// compile-flags:-l foo:framework
|
// compile-flags:-l framework=foo
|
||||||
// error-pattern: native frameworks are only available on OSX targets
|
// error-pattern: native frameworks are only available on OSX targets
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue