Opened 7 years ago

Closed 5 years ago

#55308 closed defect (invalid)

llvm-5.0 does not include clang-tidy

Reported by: ruipacheco (Rui Pacheco) Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: llvm-5.0

Description

I installed llvm-5.0 in the hope of being able to use a version of clang-tidy with the latest checks but mac ports just downloads llvm-3.9 which is too old.

Change History (2)

comment:1 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: jeremyhu removed
Owner: set to jeremyhu
Status: newassigned

Note that it's clang-5.0, not llvm-5.0, that includes clang-tidy:

$ sudo port install clang-5.0
--->  Computing dependencies for clang-5.0
--->  Fetching archive for clang-5.0
--->  Attempting to fetch clang-5.0-5.0.0_4+analyzer+libstdcxx.darwin_16.x86_64.tbz2 from https://packages.macports.org/clang-5.0
--->  Attempting to fetch clang-5.0-5.0.0_4+analyzer+libstdcxx.darwin_16.x86_64.tbz2.rmd160 from https://packages.macports.org/clang-5.0
--->  Installing clang-5.0 @5.0.0_4+analyzer+libstdcxx
--->  Activating clang-5.0 @5.0.0_4+analyzer+libstdcxx
--->  Cleaning clang-5.0
$ port contents clang-5.0|grep tidy
  /opt/local/bin/clang-tidy-mp-5.0
  /opt/local/libexec/llvm-5.0/bin/clang-tidy
  /opt/local/libexec/llvm-5.0/share/clang/clang-tidy-diff.py
  /opt/local/libexec/llvm-5.0/share/clang/run-clang-tidy.py
$ 

If your question is why MacPorts installs llvm-3.9 when you requested clang/llvm-5.0, the answer is that on some systems, building clang/llvm-5.0 requires first installing an earlier clang/llvm. This may be pulled in by the ld64 port, in which case you have some influence over which version is used, via the port's variants, and in other cases may be because the version of clang included in your version of Xcode is too old. In any case, assuming your system is new enough to support clang-5.0, simply letting MacPorts install all the dependencies it decides to should work.

comment:2 Changed 5 years ago by kencu (Ken)

Resolution: invalid
Status: assignedclosed
Note: See TracTickets for help on using tickets.