Solution: you can forcefully override the disabled status by retrieving the llvm@12 formula locally, modifying the formula file to remove the ‘disable’ line, and installing from that file.
- brew install llvm@12
+ # Download the llvm@12 formula and patch it to remove the disabled reason
+ brew update
+ brew fetch --formula llvm@12
+ FORMULA_PATH="$(brew --repo homebrew/core)/Formula/l/llvm@12.rb"
+ # Remove the 'disable!' line
+ sed -i.bak '/^ disable!/d' "$FORMULA_PATH"
+ # Install ignoring the disabled status
+ HOMEBREW_NO_INSTALL_FROM_API=1 brew install llvm@12