HomeSoftware Heritage

Fix build on Linux when `libc++` is present

Description

Fix build on Linux when libc++ is present

When a tree sitter grammar contains a scanner.cc file, a C++ standard
library must be linked to the final grammar shared object. distutils
uses the default cc compiler driver to compile and link C and C++
files. On Linux, this is GCC, so libstdc++ must be linked, even if
libc++ is present.

On Mac, libc++ is the default, even if libstdc++ is present.

Use the c++ compiler driver, so that the appropriate standard library
is selected automatically.

Details

Provenance
Paul Gey <narpfel@gmx.de>Authored on May 6 2021, 6:37 PM
narpfel <narpfel@gmx.de>Committed on May 6 2021, 9:14 PM
vsellierPushed on Aug 17 2021, 6:44 PM
Parents
rPTS501e23f8ed0b: Add GitHub action
Branches
Unknown
Tags
Unknown

Event Timeline