Feature gate portable atomics#148
Feature gate portable atomics#148MarcusGrass wants to merge 1 commit intorust-embedded-community:masterfrom
Conversation
|
Doesn't Edit: Okay, I guess it can be a bit overzealous sometimes if the target doesn't support all atomic operations, but it has its own feature flags to disable that it seems. Could that be used instead? |
I think that from a codegen standpoint it'll just be the same in release, and the unused stuff should all be eliminated, but from a hygiene perspective fewer dependencies would be nicer because of the usual reasons, not really that important though. I fully wanted this out of my dependency graph to make sure that there weren't any unintended side-effects like intrinsics creation that I relied on implicitly and decided might as well post a patch. Edit: |
|
While I understand the desire to have Given that the end result from a codegen perspective should be the same for platforms where atomics are supported, I don't see a benefit in forcing users to figure out whether or not their platform has atomics and selecting the appropriate feature flags. I fully understand that wanting to ensure emulated atomics aren't present is a very real design task for many projects, but I don't think that this is the best approach for the wide-ranging audience that this crate supports. |
Allow an opt-out for portable atomics, if the platform has atomic load/store then they aren't necessary