-
-
Notifications
You must be signed in to change notification settings - Fork 21
Add option for inkcpp to compile without exceptions #136
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
base: master
Are you sure you want to change the base?
Conversation
|
Thanks for the input. The idea with the printf and abort, I do quit, like. In this branch One question: Do you think |
|
Heya :)
Ah yes, I didn't actually notice that define before, I'm guessing "EH" stands for "exception handling? One thing that could also be nice would be
I'm happy for you to combine the branches into one PR, they seem like a good fit together |
|
Was also wondering if we could get some of these set up in CI to make sure that any future code that uses exceptions or RTTI is wrapped correctly? |
|
So rebase the other branch on yours, so it should be easy to merge (ff). Correct, EH = error handling The branch of mine also disables EH and RTTI for the clib per default (since it is not a C feature ...) A) One question from my side: B) The compile flags auto-setting sounds good; everything you can not screw up is a good thing. C) Because of the CI: my first instinct would be to build a no EH/RTTI flavor and run all tests against it
|
If you don't mind, would you be able to do the merging/rebase? I had a look and there's quite a few changes there that I feel you'll have the most context on. Alternatively we could land this and you then rebase
Ah yes, I've wrapped them with
So I gave this a go, unfortunately it seems like the compiler options then get pulled into the In general I think it makes sense for the runtime to have this option but not the compiler, do you feel comfortable with that?
I think that would be a valid test, as a starting point, personally I'd just be happy with a CI job that simply checks that the inkcpp and inkcpp_o targets compile successfully without exceptions and RTTI |
|
EH in my original #128 was for EXCEPTION_HANDLING - INKCPP_NO_EXCEPTION is a better name. I agree some kind of error output is important, I'd prefer if it was made available to the caller though, via e.g. getLastError(), vs. calling abort(). Although that would be more relevant for testing/tooling than production code. NB: It would also be good to be able to build a release version of inkcpp, without the inkAsserts - suggest adding INKCPP_NO_DEBUG for that? |
|
I think an If I see it correctly, we have the following error-handling strategies:
So maybe |
Hello!
Certain devices like the Playdate console don't have support for exceptions, currently in the code the path to disable exceptions is mixed into other defines.
This PR separates that out into its own
INKCPP_NO_EXCEPTIONSdefine with a path that prints tostderrand then callsabort()