Forward stdenv only if the C++ standard library is not the compiler default value (#9214)
Summary:
Previously, we unconditionally forward `stdenv` to C++ dependencies, in order to avoid ABI incompatibility between HHVM and dependencies. This is not necessary when the C++ standard library is the compiler default value. For example, on Linux, both clang++ and g++ links libraries with libstdc++ by default, and all nix packages are linked with libstdc++ by default, which should be already ABI compatible with HHVM.
This PR forwards `stdenv` to dependencies only if the C++ standard library is not the compiler default value, i.e. when there is a `-stdlib=` linker flag in `nix-support/libcxx-ldflags` file from the compiler wrapper package.
Pull Request resolved: https://github.com/facebook/hhvm/pull/9214
Test Plan: This PR is tested as part of https://github.com/facebook/hhvm/pull/9129
Reviewed By: alexeyt
Differential Revision:
D39702919
Pulled By: Atry
fbshipit-source-id:
7164fc7dbccda028e3648848eadc5941fd142b53