Skip to content

Document static linking and support OSX frameworks #10742

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

Merged
merged 2 commits into from
Dec 2, 2013

Conversation

alexcrichton
Copy link
Member

Commits have the fun details, and scrutiny on the new documentation would be appreciated!

This adds support to link to OSX frameworks via the new link attribute when
using `kind = "framework"`. It is a compiler error to request linkage to a
framework when the target is not macos because other platforms don't support
frameworks.

Closes rust-lang#2023
In one session of compilation, the compiler can generate multiple artifacts
through the usage of command line flags and the `crate_type` attribute.

* `--bin`, `#[crate_type = "bin"]` - A runnable executable should be produced.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could the flags just be --crate-type bin, etc?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought of doing something like that, but I didn't want to break the existing --lib flag because it seems like creating a library should still be "just that simple". Perhaps --lib would imply --crate-type dylib though, and --bin would imply --crate-type bin and then we could put all the more colorful flavors behind the crate-type flag.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"should" in all of these should be "will"

@alexcrichton
Copy link
Member Author

I've updated with all the feedback (thanks!).

@@ -2070,6 +2070,40 @@ The currently implemented features of the compiler are:
closure as `once` is unlikely to be supported going forward. So
they are hidden behind this feature until they are to be removed.

* `managed_boxes` - Usage of `@` pointers is gated by default due to many
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/by default//

@emberian
Copy link
Member

emberian commented Dec 2, 2013

r=me with fixes

This includes documentation for all the previous changes done to linking
in rust-lang#10582. Additionally, this brings the list of feature-gates up-to-date with
the currently recognized list of features.
bors added a commit that referenced this pull request Dec 2, 2013
Commits have the fun details, and scrutiny on the new documentation would be appreciated!
@bors bors closed this Dec 2, 2013
@bors bors merged commit d4c40b5 into rust-lang:master Dec 2, 2013
@alexcrichton alexcrichton deleted the frameworks branch December 4, 2013 01:43
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jul 31, 2023
Now `option_env_unwrap` warns even if a variable isn't set at compiletime

Fixes rust-lang#10742
changelog: Fix false negative where `option_env_unwrap` wouldn't warn if the env variable isn't set at compile-time.
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

Successfully merging this pull request may close these issues.

5 participants