The recommended method is via xpm.

Overview

The xPack LLVM clang can be installed automatically, via xpm (the recommended method), or manually, by downloading and unpacking one of the portable archives.

Easy install

The easiest way to install the xPack LLVM clang is by using the binary xPack, available as @xpack-dev-tools/clang from the npmjs.com registry.

Prerequisites

The only requirement is a recent xpm, which is a portable Node.js command line application. To install it, follow the instructions from the xpm install page.

Install

With xpm available, installing the latest version of the package is quite easy:

cd my-project
xpm init # Only at first use.

xpm install @xpack-dev-tools/clang@latest --verbose

This command will always install the latest available version, in the global xPacks store, which is a platform dependent folder (check the output of the xpm command for the actual folder used on your platform).

Update

For the moment, to update the package, try to install the latest release again, as shown before. If there is a new release, it will be installed, otherwise a message will warn that the package is already installed.

Future versions of xpm will implement the outdated and update commands, as npm does.

Uninstall

To remove the links from the current project:

cd my-project

xpm uninstall @xpack-dev-tools/clang

To completely remove the package from the central xPacks store:

xpm uninstall --global @xpack-dev-tools/clang

Test

To check if the xpm installed GCC starts, use something like:

C:\>%USERPROFILE%\AppData\Roaming\xPacks\@xpack-dev-tool\clang\13.0.1-1.1\.content\bin\clang.exe" --version
xPack MinGW-w64 x86_64 clang version 13.0.1
Target: x86_64-w64-windows-gnu
Thread model: posix

Manual install

For all platforms, the xPack LLVM clang binaries are released as portable archives that can be installed in any location.

The archives can be downloaded from the GitHub releases pages.

Download

The Windows versions of xPack LLVM clang are packed as ZIP files. Download the latest version named like:

  • xpack-clang-13.0.1-1-win32-x64.zip

Unpack

To manually install the xPack LLVM clang, unpack the archive and copy the versioned folder into the %USERPROFILE%\AppData\Roaming\xPacks\clang (for example C:\Users\ilg\AppData\Roaming\xPacks\clang) folder; according to Microsoft, AppData\Roaming is the recommended location for installing user specific packages.

You may shorten the last folder name and keep only the version.

Test

To check if the manually installed GCC starts, use something like:

C:\>%USERPROFILE%\AppData\Roaming\xPacks\clang\xpack-clang-13.0.1-1\bin\clang.exe" --version
xPack MinGW-w64 x86_64 clang version 13.0.1
Target: x86_64-w64-windows-gnu
Thread model: posix

Easy install

The easiest way to install the xPack LLVM clang is by using the binary xPack, available as @xpack-dev-tools/clang from the npmjs.com registry.

Prerequisites

The only requirement is a recent xpm, which is a portable Node.js command line application. To install it, follow the instructions from the xpm install page.

Install

With xpm available, installing the latest version of the package is quite easy:

cd my-project
xpm init # Only at first use.

xpm install @xpack-dev-tools/clang@latest --verbose

This command will always install the latest available version, in the global xPacks store, which is a platform dependent folder (check the output of the xpm command for the actual folder used on your platform).

Update

For the moment, to update the package, try to install the latest release again, as shown before. If there is a new release, it will be installed, otherwise a message will warn that the package is already installed.

Future versions of xpm will implement the outdated and update commands, as npm does.

Uninstall

To remove the links from the current project:

cd my-project

xpm uninstall @xpack-dev-tools/clang

To completely remove the package from the central xPacks store:

xpm uninstall --global @xpack-dev-tools/clang

Test

To check if the xpm installed GCC starts, use something like:

$ ~/Library/xPacks/@xpack-dev-tools/clang/13.0.1-1.1/.content/bin/clang --version
xPack x86_64 clang version 13.0.1
Target: x86_64-apple-darwin21.5.0
Thread model: posix

Manual install

For all platforms, the xPack LLVM clang binaries are released as portable archives that can be installed in any location.

The archives can be downloaded from the GitHub releases pages.

Download

The macOS versions of xPack LLVM clang are packed as a .tar.gz archive. Download the latest version named like:

  • xpack-clang-13.0.1-1-darwin-x64.tar.gz
  • xpack-clang-13.0.1-1-darwin-arm64.tar.gz

Unpack

To manually install the xPack LLVM clang, unpack the archive and copy it to ~/.local/xPacks/clang/xpack-clang-<version>:

mkdir -p ~/.local/xPacks/clang
cd ~/.local/xPacks/clang

tar xvf ~/Downloads/xpack-clang-13.0.1-1-darwin-x64.tar.gz
chmod -R -w xpack-clang-13.0.1-1

You may shorten the last folder name and keep only the version.

The result is a structure like:

$ tree -L 2 /Users/ilg/.local/xPacks/clang/xpack-clang-13.0.1-1
/Users/ilg/.local/xPacks/clang/xpack-clang-13.0.1-1
├── README.md
├── bin
│   ├── analyze-build
│   ├── clang -> clang-13
│   ├── clang++ -> clang
│   ├── clang-13
│   ├── clang-check
│   ├── clang-cl -> clang
│   ├── clang-cpp -> clang
│   ├── clang-doc
│   ├── clang-format
│   ├── clang-offload-bundler
│   ├── clang-offload-wrapper
│   ├── clang-refactor
│   ├── clang-rename
│   ├── clang-repl
│   ├── clang-scan-deps
│   ├── clang-tidy
│   ├── clangd
│   ├── clangd-xpc-test-client
│   ├── darwin-debug
│   ├── diagtool
│   ├── git-clang-format
│   ├── hmaptool
│   ├── intercept-build
│   ├── ld.lld -> lld
│   ├── ld64.lld -> lld
│   ├── ld64.lld.darwinnew -> lld
│   ├── ld64.lld.darwinold -> lld
│   ├── lld
│   ├── lld-link -> lld
│   ├── lldb
│   ├── lldb-argdumper
│   ├── lldb-instr
│   ├── lldb-server
│   ├── lldb-vscode
│   ├── llvm-addr2line -> llvm-symbolizer
│   ├── llvm-ar
│   ├── llvm-as
│   ├── llvm-bitcode-strip -> llvm-objcopy
│   ├── llvm-config
│   ├── llvm-cov
│   ├── llvm-cxxdump
│   ├── llvm-cxxfilt
│   ├── llvm-cxxmap
│   ├── llvm-diff
│   ├── llvm-dis
│   ├── llvm-dlltool -> llvm-ar
│   ├── llvm-lib -> llvm-ar
│   ├── llvm-libtool-darwin
│   ├── llvm-nm
│   ├── llvm-objcopy
│   ├── llvm-objdump
│   ├── llvm-otool -> llvm-objdump
│   ├── llvm-profdata
│   ├── llvm-ranlib -> llvm-ar
│   ├── llvm-rc
│   ├── llvm-readelf -> llvm-readobj
│   ├── llvm-readobj
│   ├── llvm-sim
│   ├── llvm-size
│   ├── llvm-strings
│   ├── llvm-strip -> llvm-objcopy
│   ├── llvm-symbolizer
│   ├── llvm-tapi-diff
│   ├── llvm-tblgen
│   ├── llvm-windres -> llvm-rc
│   ├── run-clang-tidy
│   ├── scan-build-py
│   ├── set-xcode-analyzer
│   ├── split-file
│   └── wasm-ld -> lld
├── distro-info
│   ├── CHANGELOG.md
│   ├── licenses
│   ├── patches
│   └── scripts
├── include
├── lib
│   ├── LLVMPolly.so
│   ├── clang
│   ├── cmake
│   ├── libLLVM.dylib
│   ├── libLTO.dylib
│   ├── libRemarks.dylib
│   ├── libclang-cpp.dylib
│   ├── libclang.dylib
│   ├── libear
│   ├── liblldb.13.0.1.dylib
│   ├── liblldb.dylib -> liblldb.13.0.1.dylib
│   └── libscanbuild
├── libexec
│   ├── analyze-c++
│   ├── analyze-cc
│   ├── c++-analyzer
│   ├── ccc-analyzer
│   ├── intercept-c++
│   ├── intercept-cc
│   ├── libLLVM.dylib
│   ├── libclang-cpp.dylib
│   ├── libedit.0.dylib
│   ├── libffi.8.dylib
│   ├── libform.6.dylib
│   ├── libgcc_s.1.dylib
│   ├── libiconv.2.dylib
│   ├── liblldb.13.0.1.dylib
│   ├── liblzma.5.dylib
│   ├── libncurses.6.dylib
│   ├── libpanel.6.dylib
│   ├── libxml2.2.dylib
│   ├── libz.1.2.11.dylib
│   └── libz.1.dylib -> libz.1.2.11.dylib
└── share
    ├── clang
    ├── opt-viewer
    ├── scan-build
    └── scan-view

17 directories, 100 files

Test

To check if the manually installed GCC starts, use something like:

$ ~/.local/xPacks/clang/xpack-clang-13.0.1-1.1/bin/clang --version
xPack x86_64 clang version 13.0.1
Target: x86_64-apple-darwin21.5.0
Thread model: posix

Easy install

The easiest way to install the xPack LLVM clang is by using the binary xPack, available as @xpack-dev-tools/clang from the npmjs.com registry.

Prerequisites

The only requirement is a recent xpm, which is a portable Node.js command line application. To install it, follow the instructions from the xpm install page.

Install

With xpm available, installing the latest version of the package is quite easy:

cd my-project
xpm init # Only at first use.

xpm install @xpack-dev-tools/clang@latest --verbose

This command will always install the latest available version, in the global xPacks store, which is a platform dependent folder (check the output of the xpm command for the actual folder used on your platform).

Update

For the moment, to update the package, try to install the latest release again, as shown before. If there is a new release, it will be installed, otherwise a message will warn that the package is already installed.

Future versions of xpm will implement the outdated and update commands, as npm does.

Uninstall

To remove the links from the current project:

cd my-project

xpm uninstall @xpack-dev-tools/clang

To completely remove the package from the central xPacks store:

xpm uninstall --global @xpack-dev-tools/clang

Test

To check if the xpm installed GCC starts, use something like:

$ ~/.local/xPacks/@xpack-dev-tools/clang/13.0.1-1.1/.content/bin/clang --version
xPack x86_64 clang version 13.0.1
Target: x86_64-pc-linux-gnu
Thread model: posix

Manual install

For all platforms, the xPack LLVM clang binaries are released as portable archives that can be installed in any location.

The archives can be downloaded from the GitHub releases pages.

Download

The GNU/Linux versions of xPack LLVM clang are packed as .tar.gz archives. Download the latest version named like:

  • xpack-clang-13.0.1-1-linux-x64.tar.gz
  • xpack-clang-13.0.1-1-linux-arm.tar.gz
  • xpack-clang-13.0.1-1-linux-arm64.tar.gz

As the name implies, these are GNU/Linux tar.gz archives; they were build on Ubuntu, but can be executed on most recent GNU/Linux distributions.

Unpack

To manually install the xPack LLVM clang, unpack the archive and copy it to ${HOME}/.local/xPacks/clang/xpack-clang-<version>:

mkdir -p ~/.local/xPacks/clang
cd ~/.local/xPacks/clang

tar xvf ~/Downloads/xpack-clang-13.0.1-1-linux-x64.tar.gz
chmod -R -w xpack-clang-13.0.1-1

You may shorten the last folder name and keep only the version.

The result is a structure like:

$ tree -L 2 /home/ilg/.local/xPacks/clang/xpack-clang-13.0.1-1
/home/ilg/.local/xPacks/clang/xpack-clang-13.0.1-1
├── bin
│   ├── analyze-build
│   ├── clang -> clang-13
│   ├── clang++ -> clang
│   ├── clang-13
│   ├── clang-check
│   ├── clang-cl -> clang
│   ├── clang-cpp -> clang
│   ├── clangd
│   ├── clang-doc
│   ├── clang-format
│   ├── clang-offload-bundler
│   ├── clang-offload-wrapper
│   ├── clang-refactor
│   ├── clang-rename
│   ├── clang-repl
│   ├── clang-scan-deps
│   ├── clang-tidy
│   ├── diagtool
│   ├── dwp
│   ├── git-clang-format
│   ├── hmaptool
│   ├── intercept-build
│   ├── ld64.lld -> lld
│   ├── ld64.lld.darwinnew -> lld
│   ├── ld64.lld.darwinold -> lld
│   ├── ld.gold
│   ├── ld.lld -> lld
│   ├── lld
│   ├── lldb
│   ├── lldb-argdumper
│   ├── lldb-instr
│   ├── lldb-server
│   ├── lldb-vscode
│   ├── lld-link -> lld
│   ├── llvm-addr2line -> llvm-symbolizer
│   ├── llvm-ar
│   ├── llvm-as
│   ├── llvm-bitcode-strip -> llvm-objcopy
│   ├── llvm-config
│   ├── llvm-cov
│   ├── llvm-cxxdump
│   ├── llvm-cxxfilt
│   ├── llvm-cxxmap
│   ├── llvm-diff
│   ├── llvm-dis
│   ├── llvm-dlltool -> llvm-ar
│   ├── llvm-lib -> llvm-ar
│   ├── llvm-libtool-darwin
│   ├── llvm-nm
│   ├── llvm-objcopy
│   ├── llvm-objdump
│   ├── llvm-otool -> llvm-objdump
│   ├── llvm-profdata
│   ├── llvm-ranlib -> llvm-ar
│   ├── llvm-rc
│   ├── llvm-readelf -> llvm-readobj
│   ├── llvm-readobj
│   ├── llvm-sim
│   ├── llvm-size
│   ├── llvm-strings
│   ├── llvm-strip -> llvm-objcopy
│   ├── llvm-symbolizer
│   ├── llvm-tapi-diff
│   ├── llvm-tblgen
│   ├── llvm-windres -> llvm-rc
│   ├── run-clang-tidy
│   ├── scan-build-py
│   ├── split-file
│   └── wasm-ld -> lld
├── distro-info
│   ├── CHANGELOG.md
│   ├── licenses
│   ├── patches
│   └── scripts
├── include
│   └── c++
├── lib
│   ├── clang
│   ├── cmake
│   ├── libc++.a
│   ├── libc++abi.a
│   ├── libc++abi.so -> libc++abi.so.1
│   ├── libc++abi.so.1 -> libc++abi.so.1.0
│   ├── libc++abi.so.1.0
│   ├── libc++experimental.a
│   ├── libclang-cpp.so -> libclang-cpp.so.13
│   ├── libclang-cpp.so.13
│   ├── libclang.so -> libclang.so.13
│   ├── libclang.so.13 -> libclang.so.13.0.1
│   ├── libclang.so.13.0.1
│   ├── libc++.so
│   ├── libc++.so.1 -> libc++.so.1.0
│   ├── libc++.so.1.0
│   ├── libear
│   ├── liblldbIntelFeatures.so -> liblldbIntelFeatures.so.13
│   ├── liblldbIntelFeatures.so.13
│   ├── liblldb.so -> liblldb.so.13
│   ├── liblldb.so.13 -> liblldb.so.13.0.1
│   ├── liblldb.so.13.0.1
│   ├── libLLVM-13.0.1.so -> libLLVM-13.so
│   ├── libLLVM-13.so
│   ├── libLLVM.so -> libLLVM-13.so
│   ├── libLTO.so -> libLTO.so.13
│   ├── libLTO.so.13
│   ├── libRemarks.so -> libRemarks.so.13
│   ├── libRemarks.so.13
│   ├── libscanbuild
│   ├── libunwind.a
│   ├── libunwind.so -> libunwind.so.1
│   ├── libunwind.so.1 -> libunwind.so.1.0
│   ├── libunwind.so.1.0
│   ├── LLVMgold.so
│   └── LLVMPolly.so
├── libexec
│   ├── analyze-c++
│   ├── analyze-cc
│   ├── c++-analyzer
│   ├── ccc-analyzer
│   ├── intercept-c++
│   ├── intercept-cc
│   ├── libatomic.so.1 -> libatomic.so.1.2.0
│   ├── libatomic.so.1.2.0
│   ├── libedit.so.0 -> libedit.so.0.0.68
│   ├── libedit.so.0.0.68
│   ├── libffi.so.8 -> libffi.so.8.1.0
│   ├── libffi.so.8.1.0
│   ├── libform.so.6 -> libform.so.6.3
│   ├── libform.so.6.3
│   ├── libgcc_s.so.1
│   ├── libiconv.so.2 -> libiconv.so.2.6.1
│   ├── libiconv.so.2.6.1
│   ├── liblzma.so.5 -> liblzma.so.5.2.5
│   ├── liblzma.so.5.2.5
│   ├── libncurses.so.6 -> libncurses.so.6.3
│   ├── libncurses.so.6.3
│   ├── libpanel.so.6 -> libpanel.so.6.3
│   ├── libpanel.so.6.3
│   ├── libstdc++.so.6 -> libstdc++.so.6.0.29
│   ├── libstdc++.so.6.0.29
│   ├── libxml2.so.2 -> libxml2.so.2.9.11
│   ├── libxml2.so.2.9.11
│   ├── libz.so.1 -> libz.so.1.2.11
│   └── libz.so.1.2.11
├── README.md
└── share
    ├── clang
    ├── opt-viewer
    ├── scan-build
    └── scan-view

18 directories, 132 files

Test

To check if the manually installed GCC starts, use something like:

$ ~/.local/xPacks/clang/xpack-clang-13.0.1-1/bin/clang --version
xPack x86_64 clang version 13.0.1
Target: x86_64-pc-linux-gnu
Thread model: posix