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

Custom build should allow "-F" and "-framework" flags #1272

Closed
jonasp opened this issue Feb 4, 2015 · 5 comments
Closed

Custom build should allow "-F" and "-framework" flags #1272

jonasp opened this issue Feb 4, 2015 · 5 comments

Comments

@jonasp
Copy link

jonasp commented Feb 4, 2015

On OS X we need framework directories -F and framework names -framework to build dependencies.

Here is for example the Qt Qml library

$ pkg-config --libs Qt5Qml
-F/usr/local/Cellar/qt5/5.4.0/lib -framework QtQml -F/usr/local/Cellar/qt5/5.4.0/lib -framework QtNetwork -F/usr/local/Cellar/qt5/5.4.0/lib -framework QtCore

Cargo explicitly allows only -L and -l flags.

@alexcrichton
Copy link
Member

The Rust compiler doesn't use the same -F and -framework flags that the linkers use, it actually uses -l framework=foo and -L native=foo for -framework and -F, respectively. Which is all to say that this should be possible today!

@jonasp
Copy link
Author

jonasp commented Feb 4, 2015

This is great, -l framework=foo works perfectly but -L native=foo does not give -F but -L. Any ideas why?

Sidenote: if this works pkg-build-rs still needs to accept the -F and -framework flags and translate them accordingly. Do you want me to open a separate issue at the pkg-build-rs issue tracker?

@alexcrichton
Copy link
Member

Gah, right! Looks like two issues need to be opened:

  1. An issue on rust-lang/rust for accepting -L framework=foo and translating that to -F.
  2. An issue on pkg-config-rs to accept -F and -framework and translate accordingly.

@jonasp
Copy link
Author

jonasp commented Feb 4, 2015

There is already rust-lang/rust/#20259 so I won't open a new one. I'll just add a note on the -L framework=foo solution.

@alexcrichton
Copy link
Member

Ok, thanks @jonasp!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants