Llvm-lit AttributeError after MacOs update

Hello, I am having some issues running llvm-lit on individual tests after updating my mac to Ventura 13.2.
I keep getting the below error. I’ve tried running different tests, re-cloning the repo, brew reinstalling llvm and cmake, re-adding my paths, all with the same results.

anon@anons-MacBook-Pro codegen % /Users/anon/documents/backup6/llvm-project/build/bin/llvm-lit -v enum-bool.cpp      
llvm-lit: /Users/anon/documents/backup6/llvm-project/llvm/utils/lit/lit/TestingConfig.py:103: fatal: unable to parse config file '/Users/anon/Documents/backup6/llvm-project/clang/test/lit.cfg.py', traceback: Traceback (most recent call last):
  File "/Users/anon/documents/backup6/llvm-project/llvm/utils/lit/lit/TestingConfig.py", line 92, in load_from_path
    exec(compile(data, path, 'exec'), cfg_globals, None)
  File "/Users/anon/Documents/backup6/llvm-project/clang/test/lit.cfg.py", line 25, in <module>
    config.test_format = lit.formats.ShTest(not llvm_config.use_lit_shell)
                                                ^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'use_lit_shell'

I’ve also looked at the solution addressed in this issue Cannot run clangd tests with llvm-lit directly · Issue #66 · clangd/clangd · GitHub, and my code contains the fix from here [clangd] Make bin/llvm-lit run standalone clangd tests · llvm/llvm-project@cb74d2e · GitHub.

The compiler still works fine, though ninja check-all gives several errors, but it has to do with my configuration after the mac update, as this doesn’t occur for my coworker (who is also using mac).

Anyone run into this, or know what it could be?

1 Like