0

If I want to install a particular version of llvm+clang, for instance 3.8.1

I see files like:

http://llvm.org/releases/3.8.1/llvm-3.8.1.src.tar.xz

http://llvm.org/releases/3.8.1/cfe-3.8.1.src.tar.xz

listed here for download: http://llvm.org/releases/download.html

but how do I untar/combine these so that I can build them?

The tar structure seems a bit odd, like it has files like this:

 cfe-3.8.1.src/lib/Sema/SemaAttr.cpp

(cfe-3.8.1.src is its root path? where should these files end up?)

This questions notes how to do it using svn: svn - How do I download a specific release of llvm,clang

Whereas I am trying to figure out using .tar style files here.

Community
  • 1
  • 1
rogerdpack
  • 62,887
  • 36
  • 269
  • 388

1 Answers1

1

You can build and install these archives separately, if you wish. Just follow standard procedure of compiling with CMake.

Alternatively, you can put cfe-3.8.1.src contents into a llvm/tools/clang subdirectory, so that you have, for example, llvm/tools/clang/lib/Sema/SemaAttr.cpp. This way you can build LLVM and Clang simultaneously.

For followers, here's where a few more packages live, if you want to cmake them all at once:

clang-tools-extra-x.x.src.tar.gz goes into llvm/tools/clang/tools/extra

and

compiler-rt-x.x.src.tar.gz goes into this subdir: llvm/projects/compiler-rt

ref

rogerdpack
  • 62,887
  • 36
  • 269
  • 388
arrowd
  • 33,231
  • 8
  • 79
  • 110