Programming

OpenMP, libc++, and libc++abi, are now part of llvm-toolchain package

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, set of C++ source libraries, is released, debuting YAP!

Will Rust Replace C++?

Bhagyashree R

Share
Published by
Bhagyashree R

Recent Posts

Top life hacks for prepping for your IT certification exam

I remember deciding to pursue my first IT certification, the CompTIA A+. I had signed…

3 years ago

Learn Transformers for Natural Language Processing with Denis Rothman

Key takeaways The transformer architecture has proved to be revolutionary in outperforming the classical RNN…

3 years ago

Learning Essential Linux Commands for Navigating the Shell Effectively

Once we learn how to deploy an Ubuntu server, how to manage users, and how…

3 years ago

Clean Coding in Python with Mariano Anaya

Key-takeaways:   Clean code isn’t just a nice thing to have or a luxury in software projects; it's a necessity. If we…

3 years ago

Exploring Forms in Angular – types, benefits and differences   

While developing a web application, or setting dynamic pages and meta tags we need to deal with…

3 years ago

Gain Practical Expertise with the Latest Edition of Software Architecture with C# 9 and .NET 5

Software architecture is one of the most discussed topics in the software industry today, and…

3 years ago