0

This is right now what shows on my machine:

clang --version
Apple LLVM version 10.0.0 (clang-1000.10.44.4)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

which clang
/usr/bin/clang

But my app requires me to use Clang 9, how can I install it on my OS X?

I've tried to use

brew install llvm@9

But no luck and here's the output:

brew install llvm@9
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 3 taps (homebrew/core, homebrew/cask and caskroom/versions).
==> Updated Formulae
glib-networking ✔      wget ✔                 asdf                   atomist-cli            cake                   cgal                   confluent-oss          dhall                  dhall-json             embulk                 get_iplayer            gocr                   hadolint               jenkins                juju                   logtalk                mps-youtube            sdl                    ssllabs-scan           taskell                xmake

Error: No available formula with the name "llvm@9"
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
  git -C "$(brew --repo homebrew/core)" fetch --unshallow

Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.

I probably should not try that command in the first place, since what I wanted to install is Clang 9, not LLVM. Reading this post helped me understand what is LLVM.

Fisher Coder
  • 2,388
  • 10
  • 32
  • 65
  • What do you mean by "no luck"? Normally, you would need to modify your PATH variable to add the other clang to it. If homebrew does not work for you for some reason, then consider using prebuilt binaries from the official website: http://releases.llvm.org. And, by the way, LLVM 9 is not released yet. – AlexDenisov Apr 02 '19 at 09:04
  • I've just edited my post to include the output of running brew install llvm@9. Then it makes total sense that LLVM 9 is not released yet. – Fisher Coder Apr 02 '19 at 19:55
  • I'm a bit confused, and i mistook LLVM with Clang. What I need is Clang version 9. – Fisher Coder Apr 02 '19 at 20:00
  • There is confusion, indeed. There are at least two versions of LLVM/Clang: open source version and Apple Version. The latest Open Source version is 8, while the Apple LLVM/Clang has the same version as Xcode. If you need Clang 9, then it could only be the Apple Clang from Xcode 9. – AlexDenisov Apr 02 '19 at 21:06
  • Got it, thanks for the clarification, then next question is how can I get Clang 9 on my Mac, I also asked this question separately here: https://stackoverflow.com/questions/55483595/how-to-intall-clang-9-on-mac – Fisher Coder Apr 02 '19 at 21:09
  • My Xcode is 9.2 and it has to stay at this version. – Fisher Coder Apr 02 '19 at 21:10

0 Answers0