-
Notifications
You must be signed in to change notification settings - Fork 284
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
build: update OSX builds to llvm clang #5822
Conversation
give it a section to show how to install and explicitly build with brew's clang instead of apple clang.
Autofix has formatted code style violation in this PR. I edit commits locally (e.g: git, github desktop) and want to keep autofix
I do not want the automated commit
If you don't do this, your following commits will be based on the old commit, and cause MERGE CONFLICT. |
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, please ignore the clang-tidy errors, sol.hpp should've been excluded anyways because it's meant to be included from other header
Checklist
Required
main
so it won't cause conflict when updatingmain
branch later.Optional
Purpose of change
From what I can understand, OSX builds weren't building due to apple clang being different from normal clang.
Describe the solution
I've updated the workflow files to use llvm clang from brew (
COMPILER=$(brew --prefix llvm)/bin/clang++
) and install the dependencies required for building (on my Mac, at least):llvm astyle
from brew andpolib luaparser
from pip.A line of code in
src/sol/sol.hpp
around line 6759 had to be changed to make the builds work, but I won't admit to knowing what I did to fix it, because chatgpt was a very poor explainer.Also adds
osx.yml
for building OSX in the same way that there existsandroid.yml
andmsys-cmake.yml
.Describe alternatives you've considered
It felt like a more complete solution to me to completely decouple builds from an osx-specific clang so that maintenance would be easier later down the line.
Testing
I built the game with the same commands on my computer, opened a new world, played a random character, and killed a zed with a pool cue. Worked.
Should see if the tests work OK on this PR, and if it fixes builds.
Might cause a memory leak since I've messed with c++ without knowing c++... unsure how to test for that.