diff options
| author | bors <bors@rust-lang.org> | 2015-02-05 08:47:48 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-02-05 08:47:48 +0000 |
| commit | 2bd8ec2d197809fc0f0efccf1de14419ffb17b2b (patch) | |
| tree | d6cc34bd5464f85c22856104ccacd7bb86a3ba30 /src/librustc | |
| parent | fa28f023c23ce1c72d8a83478a0263dcc5083078 (diff) | |
| parent | 6c62839a7ff4752fdd77e599beb87f3ccaaa6e84 (diff) | |
| download | rust-2bd8ec2d197809fc0f0efccf1de14419ffb17b2b.tar.gz rust-2bd8ec2d197809fc0f0efccf1de14419ffb17b2b.zip | |
Auto merge of #21944 - alexcrichton:lframework, r=eddyb
On OSX the linker has a separate framework lookup path which is specified via the `-F` flag. This adds a new kind of `-L` path recognized by the compiler for frameworks to be passed through to the linker. Closes #20259
Diffstat (limited to 'src/librustc')
| -rw-r--r-- | src/librustc/session/config.rs | 3 | ||||
| -rw-r--r-- | src/librustc/session/search_paths.rs | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs index 88f6dc673cf..8faf81a1564 100644 --- a/src/librustc/session/config.rs +++ b/src/librustc/session/config.rs @@ -738,7 +738,8 @@ pub fn rustc_short_optgroups() -> Vec<RustcOptGroup> { vec![ opt::flag("h", "help", "Display this message"), opt::multi("", "cfg", "Configure the compilation environment", "SPEC"), - opt::multi("L", "", "Add a directory to the library search path", "PATH"), + opt::multi("L", "", "Add a directory to the library search path", + "[KIND=]PATH"), opt::multi("l", "", "Link the generated crate(s) to the specified native library NAME. The optional KIND can be one of, static, dylib, or framework. If omitted, dylib is diff --git a/src/librustc/session/search_paths.rs b/src/librustc/session/search_paths.rs index c6436d47c73..c314a999f24 100644 --- a/src/librustc/session/search_paths.rs +++ b/src/librustc/session/search_paths.rs @@ -25,6 +25,7 @@ pub enum PathKind { Native, Crate, Dependency, + Framework, ExternFlag, All, } @@ -41,6 +42,8 @@ impl SearchPaths { (PathKind::Crate, &path["crate=".len()..]) } else if path.starts_with("dependency=") { (PathKind::Dependency, &path["dependency=".len()..]) + } else if path.starts_with("framework=") { + (PathKind::Framework, &path["framework=".len()..]) } else if path.starts_with("all=") { (PathKind::All, &path["all=".len()..]) } else { |
