Skip to content

Provide C++ ABI version to addons #2576

@saper

Description

@saper

Some platforms (most notably FreeBSD, MacOSX) use gcc or clang interchangeably. We no longer support compiler identification (#205), but what is needed for addons is know know which C++ library node has been compiled against.

At node-sass (https://github.com/sass/node-sass/blob/043c56705c663977468551206556d7f3c75ef9c1/src/libsass.gyp#L68) we were using --stdlib=libc++ clang option to force the use of Clang's C++ library but that is probably incorrect as this causes issues with node engines compiled against GNU libstc++.so.6. (Example: fsevents/fsevents#82).

FreeBSD 9 uses oldish GCC (4.2.1 by default) and we need to use some newer add-on compiler to get a decent C++11 support. But we don't know if the user compiles node with libstdc++.so.6 from gcc 4.8, 4.9 or maybe 5.0, or maybe with clang and links against its libc++.

It would be idea if C++ ABI information made its way into config.gypi and into the process.config variable.
We would love to be able to provide different binary modules for different C++ library configurations (sass/node-sass#733).

Some additional links for reference:

Metadata

Metadata

Assignees

No one assigned

    Labels

    c++Issues and PRs that require attention from people who are familiar with C++.feature requestIssues that request new features to be added to Node.js.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions