Uh oh!
There was an error while loading. Please reload this page.
rustc: Add a new crate type, cdylib - #33553
Conversation
rust-highfive
commented
May 11, 2016
r? @jroesch (rust_highfive has picked a reviewer for you, use r? to override) |
alexcrichton
commented
May 11, 2016
r? @brson |
brson
commented
May 13, 2016
@bors r+ |
bors
commented
May 13, 2016
📌 Commit a3f5d08 has been approved by |
There was a problem hiding this comment.
This doesn't seem to be enough for iOS, see failure.
eddyb
commented
May 13, 2016
@bors r- Likely responsible for this failure. |
alexcrichton
commented
May 13, 2016
Indeed! looks quite suspicious |
alexcrichton
commented
May 13, 2016
@bors: r=brson bfe7a80 |
Manishearth
commented
May 14, 2016
Travis fails |
bors
commented
May 14, 2016
⌛ Testing commit bfe7a80 with merge 2d45326... |
bors
commented
May 14, 2016
💔 Test failed - auto-mac-64-opt-rustbuild |
eddyb
commented
May 14, 2016
I'm working on rebasing this over #33602 because otherwise I'd need windows to investigate my metadata problem. |
alexcrichton
commented
May 17, 2016
bors
commented
May 17, 2016
⌛ Testing commit 557aae0 with merge 3ad8865... |
bors
commented
May 17, 2016
💔 Test failed - auto-linux-64-opt-rustbuild |
rustc: Add a new crate type, cdylib 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#1510Closes#33132
bors
commented
May 19, 2016
💔 Test failed - auto-linux-musl-64-opt |
alexcrichton
commented
May 19, 2016
@bors: r=brson 0192796 |
bors
commented
May 19, 2016
⌛ Testing commit 0192796 with merge 89347bf... |
bors
commented
May 19, 2016
💔 Test failed - auto-mac-64-nopt-t |
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#1510Closesrust-lang#33132
alexcrichton
commented
May 19, 2016
bors
commented
May 20, 2016
rustc: Add a new crate type, cdylib 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#1510Closes#33132
bors
commented
May 20, 2016
bluss
commented
May 21, 2016
This is kind of immediately a new feature on the stable release where this is included, isn't it? If I'm wrong, then the relnote tag can be removed again. |
torkleyy
commented
Apr 9, 2017
@alexcrichton How can I compile a crate as |
alexcrichton
commented
Apr 10, 2017
@torkleyy unfortunately that's not possible right now (short of generating a new |
torkleyy
commented
Apr 10, 2017
@alexcrichton Thanks for your reply!
Sure, I'll do that. |
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 existingdylibcrate type in a few key ways:
externfunctions are visible symbolsThis 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_symbolsfunction on Unix which nowactually does something. This helps restrict the public symbols from a cdylib on
Unix.
With this PR a "hello world"
cdylibis 7.2K while the samedylibis 2.4MB,which is some nice size savings!
Closes#33132