-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Doesn't add elements to distributed slice from external crate on macOS #61
Comments
May be the compiler is optimizing out the crate where |
I ran into the issue in macOS, where I tried the |
This seems to be related to the embed-bitcode flag, which seems to be set by cargo when lto is not "off" on macOS. There's no direct way to enable this flag via cargo, so this seems to be the only workaround for now. I added this for dev builds
|
Neither of the above solutions worked for me using Linux. Adding so that it's apparent that that's not a guaranteed fix. |
The workaround of setting |
This is an upstream issue in |
If
BENCHMARKS
is initialized in external crate the call to#[distributed_slice(BENCHMARKS)]
doesn't addbench_deserialize
function to the array. But if I turn onlto=true
in Cargo.toml of the builded project (whereBENCHMARKS
is placed) lib works as expected.I also tested this on ubuntu and it worked without
lto
The text was updated successfully, but these errors were encountered: