-
Notifications
You must be signed in to change notification settings - Fork 117
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
Add a no_prefix feature #54
Conversation
There are some targets that we still force a prefix since they have issues when their libc malloc is replaced in this way. Closes gnzlbg#39
I think it can be unexpected to silently use a prefix when the |
I'm going to hold on a new release until @SimonSapin issues in the last two PRs are resolved. @SimonSapin mind you opening an issue? |
@SimonSapin my concern about failing the build is that there's no way to enable a feature on a target-specific basis IIRC, so if you want to have jemalloc replace libc malloc on Linux, you're not going to be able to run on OSX or whatever. |
I was thinking of enabling the feature in a |
I think this is possible: https://github.com/gnzlbg/slice_deque/blob/master/Cargo.toml#L24 |
Depending on a crate or not at all based on I don’t know if conditionally enabling a feature based on |
Maybe rust-lang/cargo#4866 ? There are issues with feature/dependency resolution when doing target specific things, but enabling/disabling the feature works IIRC. |
I thought rust-lang/cargo#4866 wasn’t it based on the title and first message, but it does discuss Since conditionally-enabled feature doesn’t work, I suppose the best we can do is rename the feature to Test case
[package]
name = "foo"
version = "0.1.0"
[dependencies]
a = {path = "./a"}
[target.'cfg(windows)'.dependencies]
a = {path = "./a", features = ["b"]}
[target.'cfg(unix)'.dependencies]
a = {path = "./a", features = ["c"]}
extern crate a;
fn main() {
a::b();
a::c();
}
#[cfg(feature = "b")]
pub fn b() {}
#[cfg(feature = "c")]
pub fn c() {}
[package]
name = "a"
version = "0.1.0"
[features]
b = []
c = [] |
Those feature names seem reasonable to me. |
There are some targets that we still force a prefix since they have
issues when their libc malloc is replaced in this way.
Closes #39