-
Notifications
You must be signed in to change notification settings - Fork 256
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
Remove build script #490
Remove build script #490
Conversation
d1923bf
to
5528793
Compare
src/lib.rs
Outdated
AtomicUsize { v: Cell::new(v) } | ||
} | ||
// In case it has atomics. See https://github.com/rust-lang/log/issues/489. | ||
#[cfg(not(all( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#[cfg(not(all( | |
#[cfg(not(any( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
src/lib.rs
Outdated
if current == prev { | ||
self.v.set(new); | ||
// In case it has atomic_cas. | ||
#[cfg(any( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This duplicates the outer module's cfg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No it doesn't, the difference is the first one:
thumbv4t-none-eabi
vs thumbv6m-none-eabi
I didn't want to only keep this one so it would make it easier for potential future updates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Out of curiosity did you measure the build time differences?
Note for other reviews: you might want to enable GitHub's "Hide whitespace" feature (File changed > cog icon below it > Hide whitespace).
I didn't for the simple reason I think there is close to none (it builds far too quickly on my computer to be able to measure a difference). Like said in the issue, its impact will be on the global rust environment. |
5603c43
to
64fa754
Compare
64fa754
to
9c66f5f
Compare
So the current failure is because there is no $ rustc --print cfg --target thumbv4t-none-eabi
debug_assertions
panic="abort"
target_abi="eabi"
target_arch="arm"
target_endian="little"
target_env=""
target_feature="thumb-mode"
target_has_atomic_equal_alignment="16"
target_has_atomic_equal_alignment="32"
target_has_atomic_equal_alignment="8"
target_has_atomic_equal_alignment="ptr"
target_has_atomic_load_store="16"
target_has_atomic_load_store="32"
target_has_atomic_load_store="8"
target_has_atomic_load_store="ptr"
target_os="none"
target_pointer_width="32"
target_vendor="unknown" As you can see, there is no equivalent of |
I think it's not possible to use |
} | ||
// In case it has atomics. See https://github.com/rust-lang/log/issues/489. | ||
#[cfg(not(any( | ||
target = "thumbv4t-none-eabi", |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but I can't find the thumbv4t
information in any of them as mentionned here.
Sorry, I don't understand this. Can you explain some more? What is the current failure? BTW, when I run
I don't know if this is significant. |
We can get the |
Please bear with me as I get my head around this. Are you saying that this code:
doesn't work? How does it fail? Is it a compile-time problem, a run-time problem, something else? |
It doesn't work because |
I see, I thought |
Fixes #489.
This is the implementation suggested in #489. Another possibility to reduce the number of
cfg
was to use macros but since we're talking about improving build times, I preferred to not use them.