2 min read

On Tuesday, LLVM announced that starting from LLVM 7, the packages libc++, libc++abi, and OpenMP are integrated into llvm-toolchain. Integration of these libraries was a project proposed in the Google Summer of Code 2018.

Warnings and usage of the libc++* and OpenMP packages

libc++* packages

The libc++ and libc++abi packages that are currently present in Debian and Ubuntu repositories will not be affected, but they will be removed in the later versions. Also, the newly integrated libcxx* packages are not co-installable with them.

To keep the library usage same as before, symlinks are provided from the original locations. For example, from /usr/lib/x86_64-linux-gnu/libc++.so.1.0 to /usr/lib/llvm-7/lib/libc++.so.1.0.

The usage of libc++ is as follows:

$ clang++-7 -std=c++11 -stdlib=libc++ foo.cpp

$ ldd ./a.out|grep libc++

  libc++.so.1 => /usr/lib/x86_64-linux-gnu/libc++.so.1 (0x00007f62a1a90000)

  libc++abi.so.1 => /usr/lib/x86_64-linux-gnu/libc++abi.so.1 (0x00007f62a1a59000)

OpenMP packages

Though OpenMP has been a part of Debian and Ubuntu archives, only one version was supported on the system. To address this, OpenMP is integrated with the llvm-toolchain.

Similar to libc++, to keep the current usage same, the newly integrated package creates a symlink from /usr/lib/libomp.so.5 to /usr/lib/llvm-7/lib/libomp.so.5.

It can be used with clang through -fopenmp flag:

$ clang -fopenmp foo.c

The dependency packages that provide the default libc++* and OpenMP package are also integrated into llvm-defaults. Using the following command you will able to install the current version of all these packages:

$ apt-get install libc++-dev libc++abi-dev libomp-dev

To get more clarity on the integration of libc++* and OpenMP in llvm-toolchain, check out their announcement on LLVM’s site.

Read Next

LLVM 7.0.0 released with improved optimization and new tools for monitoring

Boost 1.68.0, a set of C++ source libraries, is released, debuting YAP!

Will Rust Replace C++?