(03-24-2022, 03:20 PM)noobsoftware Wrote: Just wondering did you use the main branch for building on Monterey? I see the clang branch hasn't been updated as recently. When i tried to build using the master branch using -O2 it fails when trying to package and also when trying to run i get the following error:
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x1d0)
frame #0: 0x0000000106f7c6ba XUL`___lldb_unnamed_symbol66960$$XUL + 42
XUL`___lldb_unnamed_symbol66960$$XUL:
-> 0x106f7c6ba <+42>: movq 0x1b0(%rdi), %rax
0x106f7c6c1 <+49>: leaq 0x10(%rax), %rcx
0x106f7c6c5 <+53>: testq %rax, %rax
0x106f7c6c8 <+56>: cmoveq %rdi, %rcx
Target 0: (basilisk) stopped.
Should i be using the Clang branch instead to build on Monterey?
Ah, i misunderstood about the optimizations. I will try building using an older version of macOS.
The code changes in the newclang branch didn't fix the optimization crash... even though it eliminated the code that the crash had been occuring in, the crash just started happening somewhere else. I merged the first 4 commits into master... but the last 4 have not had enough testing... and I did experience an unexpected crash in my few days of testing so I am not convinced it is stable yet. After I do more testing those commits will eventually be merged to master too, however they did not fix the problem. So for now use the master branch.
For Monterey builds I am using the following optimization options: "-O1 -fvectorize -fslp-vectorize"
-fvectorize and -fslp-vectorize are optimizations from -O2 ... but there are more that don't have clang options... instead you are supposed to enable them using -mllvm <opt>
Where <opt> is an option to the LLVM opt command, however this does not seem to work with Apple's clang from Xcode.
So I am not sure which of the remaining -O2 options are causing the crash.
If you want to build on Monterey with the latest Xcode for now use the "-O1 -fvectorize -fslp-vectorize" options... this will get you as close to -O2 as possible with clang options.