facebook / hhvm

A virtual machine for executing programs written in Hack.
https://hhvm.com
Other
18.19k stars 3k forks source link

Forward stdenv only if the C++ standard library is not the compiler default value #9214

Closed Atry closed 2 years ago

Atry commented 2 years ago

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.

Test Plan: This PR is tested as part of https://github.com/facebook/hhvm/pull/9129

facebook-github-bot commented 2 years ago

@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 2 years ago

@Atry has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot commented 2 years ago

@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 2 years ago

@Atry has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 2 years ago

@Atry has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot commented 2 years ago

@Atry has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot commented 2 years ago

@Atry has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot commented 2 years ago

@Atry has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 2 years ago

@Atry has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.