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

Rollup of 7 pull requests #33680

Closed
wants to merge 25 commits into from
Closed

Rollup of 7 pull requests #33680

wants to merge 25 commits into from

Conversation

Sander Maijers and others added 25 commits May 13, 2016 19:18
This commit is an implementation of [RFC 1510] which adds a new crate type,
`cdylib`, to the compiler. This new crate type differs from the existing `dylib`
crate type in a few key ways:

* No metadata is present in the final artifact
* Symbol visibility rules are the same as executables, that is only reachable
  `extern` functions are visible symbols
* LTO is allowed
* All libraries are always linked statically

This commit is relatively simple by just plubming the compiler with another
crate type which takes different branches here and there. The only major change
is an implementation of the `Linker::export_symbols` function on Unix which now
actually does something. This helps restrict the public symbols from a cdylib on
Unix.

With this PR a "hello world" `cdylib` is 7.2K while the same `dylib` is 2.4MB,
which is some nice size savings!

[RFC 1510]: rust-lang/rfcs#1510

Closes rust-lang#33132
`nest_level` is long dead since cac7a20
(PR rust-lang#14831), so is `check_positional_ok()`. Let's bid them farewell.
Add error explanation for E0502

I am questioning the order of presentation on the suggested code fixes, but I'm not sure what would be best.  Thoughts?

r? @GuillaumeGomez
…rister

Save metadata even with -Z no-trans (e.g. for multi-crate cargo check).

Removes the item symbol map in metadata, as we can now generate them in a deterministic manner.
The `-Z no-trans` change lets the LLVM passes and linking run, but with just metadata and no code.
It fails while trying to link a binary because there's no `main` function, which is correct but not good UX.

There's also no way to easily throw away all of the artifacts to rebuild with actual code generation.
We might want `cargo check` to do that using cargo-internal information and then it would just work.

cc @alexcrichton @nikomatsakis @Aatch @michaelwoerister
…omatsakis

IntelliJ support, ordering, cleanup
…tsakis

syntax_ext: format: nest_level's are no more

Just noticed this while working on rust-lang#33642 and here's a quick fix, shouldn't touch anything else. It's some historic code indeed...
…yle, r=steveklabnik

Fix selected item background style

r? @steveklabnik
Add missing code fence to `diagnostics.rs`

Closes rust-lang#33662
@rust-highfive
Copy link
Collaborator

r? @arielb1

(rust_highfive has picked a reviewer for you, use r? to override)

@eddyb
Copy link
Member Author

eddyb commented May 17, 2016

@bors r+ p=100

@bors
Copy link
Contributor

bors commented May 17, 2016

📌 Commit a8c9eb6 has been approved by eddyb

@bors
Copy link
Contributor

bors commented May 17, 2016

⌛ Testing commit a8c9eb6 with merge 4253cc0...

@bors
Copy link
Contributor

bors commented May 17, 2016

💔 Test failed - auto-linux-64-opt-rustbuild

@bors
Copy link
Contributor

bors commented May 18, 2016

☔ The latest upstream changes (presumably #33476) made this pull request unmergeable. Please resolve the merge conflicts.

@eddyb eddyb closed this May 25, 2016
@eddyb eddyb deleted the rollup branch May 25, 2016 23:14
@Centril Centril added the rollup A PR which is a rollup label Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants