Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When building on OSX, "-L" needs to set the search path for frameworks as well as libraries. #20259

Closed
caryhaynie opened this issue Dec 27, 2014 · 2 comments · Fixed by #21944
Labels
A-linkage Area: linking into static, shared libraries and binaries O-macos Operating system: macOS

Comments

@caryhaynie
Copy link

Currently, it appears that

  1. rustc disables the standard framework search path by default,
  2. the only way to specify an alternative framework search path is via '-C link_args="-F "' to rustc, or by using the oft derided link_args crate attribute.

This makes linking against frameworks via cargo incredibly difficult, since cargo only allows setting the "-l" and "-L" compiler flags. It would be great if rustc modified both the dylib search path and the framework search path when a "-L" option is passed to rustc on OSX.

@alexcrichton
Copy link
Member

This seems like #19941 and #19767 play into this quite a bit.

@kmcallister kmcallister added O-macos Operating system: macOS A-linkage Area: linking into static, shared libraries and binaries labels Jan 16, 2015
@jonasp
Copy link

jonasp commented Feb 4, 2015

@alexcrichton suggested in rust-lang/cargo/#1272 to add -L framework=foo which should be translated to -F just like -l framework=foo is being translated into -framework.

alexcrichton added a commit to alexcrichton/rust that referenced this issue Feb 4, 2015
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 rust-lang#20259
bors added a commit that referenced this issue Feb 5, 2015
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linkage Area: linking into static, shared libraries and binaries O-macos Operating system: macOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants