[build] macOS support (without trivial-main-thread) - #5
Open
egbulmer wants to merge 2 commits into
Open
Conversation
Owner
|
Neat! Thanks for this - I'll review as soon as I'm able. |
fosskers
reviewed
May 25, 2026
|
|
||
| (defun main () | ||
| ,#+darwin | ||
| (trivial-main-thread:with-body-in-main-thread () |
Owner
There was a problem hiding this comment.
Great, so it looks like trivial-main-thread concerns can be pushed to the level of the application and be kept out of the lib.
| ,#+darwin | ||
| (trivial-main-thread:with-body-in-main-thread () | ||
| ,#+sbcl | ||
| (sb-int:set-floating-point-modes :traps '()) |
Owner
There was a problem hiding this comment.
Any idea why this ended up being necessary?
Author
There was a problem hiding this comment.
I found this explanation in the cl-glfw3 library and a few discussions around similar problems (1, 2). Given that comment, it may be that only the window initialisation code needs to have floating point traps disabled. I'll do some tests to confirm.
Update: I ran a quick test and unfortunately it seems that drawing calls such as (rl:end-drawing) also trigger the traps.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is identical to #2 except with the
trivial-main-threadparts reverted and an update to the README. Further to #2 (comment), I can confirm that it works on my MacBook. I found that I also had to disable the floating point traps when running with SBCL.Thanks @fosskers for this fantastic library and @takeiteasy for the initial macOS support.