-
Notifications
You must be signed in to change notification settings - Fork 27
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
Fix __FILE__ macro #97
Conversation
3c5abbd
to
5c0f53f
Compare
Okay, no longer messing with |
f763cff
to
54ff957
Compare
Okay, sorry about all the changes, but this is so much better now. It turns out saving everything but the message is redundant for all asserts if the logic is reworked slightly. The only slight downside is that now you need to compile with I also got backtraces working through virtual memory! And with that I'll stop adding things to this PR before it gets any more out of hand. 😅 |
Does it still do that if you clear ccache? I was having issues with that when I was messing with |
Nope, |
That is super strange. I tried running |
54ff957
to
13dfd5c
Compare
Okay after parsing through the effect sizes between our two ROMs, it turns out that many of them are different sizes, and neither ROM always has the bigger or smaller one. Nothing jumps out at me when looking in a hex editor, so I'm inclined to think it really might just be compiler differences. In fact, Instead of an assert, what if I just print a warning? And then later we can implement larger effects with consecutive TLB pages like clover suggested in discord to actually solve the problem. |
#98 successfully reports:
Will merge this and remove the runtime check in 98. |
So it turns out
__FILE_NAME__
wasn't implemented until gcc-12, which isn't standard in Ubuntu until 24.04. The GitHub action won't be a problem onceubuntu-latest
has finished its rollout to that version by the end of this month, but it's still a bit of an unreasonable requirement for users. Instead, this uses-fmacro-prefix-map
to remove the path from__FILE__
at compile time. I also went ahead and applied it throughout the whole project, which will save a bit of space anywhere asserts are used, and as far as I can tell it isn't breaking anything.Additionally, I added a runtime check at boot for effect sizes. Doing it at compile time will of course be better, but until that's implemented I thought I might as well add it.
And finally, python formatting was fixed so the Python Formatting & Linting action stops failing.