Uh oh!
There was an error while loading. Please reload this page.
Fix the recent breakage of the gba crate - #704
Conversation
| /// Application Program Status Register | ||
| pub struct APSR; | ||
| #[cfg(any(not(target_feature = thumb-mode), target_feature = v6t2))] |
There was a problem hiding this comment.
You will need to add quotes around the features I believe, and thumb-mode probably needs to be added to https://github.com/rust-lang/rust/blob/c2ddf5a1dd54ebe18ffb794e096c28a4ed8e1d16/src/librustc_codegen_llvm/llvm_util.rs#L96
There was a problem hiding this comment.
oh no! that's take a whole other PR first :/
gnzlbg
commented
Mar 11, 2019
@Lokathor could you open an issue in rust-lang/rust upstream that missing double quotes here should raise an error ? Idk how easy / hard would that be to implement, but I doubt you are the first one to make this mistake. |
gnzlbg
commented
Mar 11, 2019
Lokathor
commented
Mar 11, 2019
@gnzlbg I didn't put double quotes around the feature names (which is wrong) and then it failed to build (which is correct). That part of it seems fine as far as I can tell. |
parched
commented
Mar 11, 2019
BTW, a reference for this is under 'Architectures' http://infocenter.arm.com/help/topic/com.arm.doc.dui0473m/dom1361289881374.html |
parched
commented
Mar 11, 2019
@gnzlbg Do you think we could we add a |
gnzlbg
commented
Mar 11, 2019
@parched sure, the |
Lokathor
commented
Mar 11, 2019
Ah, I'm not sure how much the GBA deviates from any other "normal" ARMv4TDMI chip, but if we're adding targets to CI could we settle on a gba target file and then have that get into CI? |
Lokathor
commented
Mar 14, 2019
So here's a question: this can be fixed for GBA using just the existing "v6t2" feature bound, but then it'd stay broken for othes until the thumb-mode feature went in and we make a more precise bound. Would it be acceptable to just have the partial fix and add an armv4t CI check, and do the rest later? |
gnzlbg
commented
Mar 14, 2019
Sure, just add a build job that |
Lokathor
commented
Mar 14, 2019
Cool. Any opinion on the other part about just doing the quick fix now and the rest later? |
gnzlbg
commented
Mar 14, 2019
via email
Send a PR and we can explore it further, I’m in general in favor of
incremental improvement, but It’ll depend on how exactly that looks like. …On Thu 14. Mar 2019 at 18:54, Lokathor ***@***.***> wrote:
Cool. Any opinion on the other part about just doing the quick fix now and
the rest later?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#704 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA3NpmjMw5yasmbHyItdbrcmonGEIm_Dks5vWozqgaJpZM4bn1s0>
.
|
Lokathor
commented
Mar 14, 2019
Cool, I'll update this PR when I get home |
Lokathor
commented
Mar 15, 2019
Agh, I misread it, there's no way to do a small change. I'll start a PR for adding "thumb-mode" to rustc I guess. |
gnzlbg
commented
Mar 15, 2019
gba crategba crategnzlbg
commented
Mar 16, 2019
So it seems that there are issues related to |
Lokathor
commented
Mar 17, 2019
Near as I can tell, the CI for gba can't build because it first has to build core, which is depending on the code we're trying to patch. @gnzlbg says that we should accept this as is, update rust-lang/rust, and then we can re-run CI and proceed from there. I agree. @ketsuban is the only other regular Rustacean that compiles for GBA and they've agreed that the target file is one we can settle on for here (and hopefully in to the tier-3 list in the main rust repo once this is sorted out). |
This PR "temporarily" disables support for APSR for all ARM targets. I've merged this "as is" because I consider this addition a regression that broke downstream code, and there doesn't really seem to be a super-quick path to a good fix (need to support thumb-mode, arm-mode, etc.). The current CI added here to track this fix is "broken" because The next step is to update stdsimd upstream, and see if CI here starts passing. Afterwards, we can work on taking the necessary steps for re-enabling APSR without any stress. I'm sorry if this breaks some already-existing embedded Rust code relying on APSR via libcore. That code can temporarily continue to use APSR by using the Since the code using APSR is very recent and has a good workaround available, while the code broken by the addition of APSR is old and lacks a workaround, I believe that proceeding in this way will cause the minimum amount of breakage. Temporary breakage on nightly seems, however, inevitable. |
gba crategba crateUpdate stdsimd This PR fixes a regression introduced by ACLE support on thumbv4 targets, see: rust-lang/stdarch#704 .
As per this issue, I've added the required cfg attribute. I'm just going by what @parched said, I don't know if this is the perfect minimum cfg bound myself.