Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upstd: link to liballoc_system if compiled without the jemalloc feature #37975
Conversation
rust-highfive
assigned
alexcrichton
Nov 24, 2016
This comment has been minimized.
This comment has been minimized.
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
This comment has been minimized.
This comment has been minimized.
|
With this and #37974, I can CROSS compile std using Cargo and the following Cargo.toml: [package]
[dependencies.alloc_system]
path = "$RUST_SRC/src/liballoc_system"
[dependencies.panic_abort]
path = "$RUST_SRC/src/libpanic_abort"
[dependencies.std]
path = "$RUST_SRC/src/libstd"
[profile.dev]
panic = "abort"
[profile.release]
panic = "abort"without any change to rust-src. |
This comment has been minimized.
This comment has been minimized.
|
@bors: r+ Awesome progress! |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Nov 25, 2016
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
This is blocking Xargo from being able to compile the |
This comment has been minimized.
This comment has been minimized.
|
Maybe this is affected by how tests are run? Maybe nondeterministic? I'm not sure :( |
This comment has been minimized.
This comment has been minimized.
Want to retry? (or let's |
This comment has been minimized.
This comment has been minimized.
|
Hm if it is nondeterministic I'd be wary of landing b/c then it'd just turn into a problem I'd have to debug later... If you try running a few times this surely never reproduces on Linux? |
This comment has been minimized.
This comment has been minimized.
|
Note that the nondeterminism is just a wild guess, I don't actually know what the problem is. |
This comment has been minimized.
This comment has been minimized.
HybridEidolon
commented
Dec 19, 2016
|
I built this locally for |
This comment has been minimized.
This comment has been minimized.
HybridEidolon
commented
Dec 23, 2016
•
|
This only fails on makefiles build for me; the tests build and run successfully using rustbuild, contingent on stage2 std being build with Here is a patch (a simple one-liner) that fixes the test failures under darwin targets by setting |
japaric
added some commits
Nov 24, 2016
japaric
force-pushed the
japaric:alloc-system
branch
from
eb78c71
to
fa10ef8
Dec 23, 2016
This comment has been minimized.
This comment has been minimized.
|
That patch totally makes sense. Thanks for investigating, @HybridEidolon! @bors r=alexcrichton |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Dec 23, 2016
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
HybridEidolon
commented
Dec 28, 2016
|
This isn't going to work on targets that do actually use alloc_system. libstd will have an alloc_system dependency and crates that override the default allocator and are not |
japaric
added a commit
to japaric/rust
that referenced
this pull request
Jan 4, 2017
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this pull request
Jan 9, 2017
This was referenced Jan 14, 2017
This comment has been minimized.
This comment has been minimized.
|
The new logic seems wrong. As @HybridEidolon says, if you apply this patch disabling jemalloc means you can never drop in another allocator crate because std has a hardcoded dependency on liballoc_system. That's a bit sad. Ideally I think it'd be nice to specify an allocator preference in Cargo.toml/cargo command line (used when an allocator must be picked i.e. dylibs, not rlibs), but since that's not possible we can make do with a force_alloc_system feature (which, as before, locks you into a single allocator for stage0). Crucially, this feature is distinct from the jemalloc feature - we don't want someone to be forced into alloc_system just for disabling jemalloc! See #39086 |
This comment has been minimized.
This comment has been minimized.
|
I'm going to close this due to inactivity, but it'd be great to land a fix for this still! |
japaric commentedNov 24, 2016
fixes #36501
r? @alexcrichton