Use the default C++ runtime when CLANG_FORCE_LIBSTDCXX is not set (#9215)
Summary:
Previously, libc++ is used when the compiler is clang and `CLANG_FORCE_LIBSTDCXX` is not set. It's a surprising behavior because the user would expect HHVM to be linked with the compiler default C++ runtime when `CLANG_FORCE_LIBSTDCXX` is not set. Especially when the default C++ runtime is libstdc++ for Clang on Linux, the linker will report an error of `cannot find -lc++: No such file or directory` when `CLANG_FORCE_LIBSTDCXX` is not set. See https://github.com/facebook/hhvm/actions/runs/
3099973322/jobs/
5019734982 for the build log.
This PR instead uses the default C++ runtime when CLANG_FORCE_LIBSTDCXX is not set
Pull Request resolved: https://github.com/facebook/hhvm/pull/9215
Test Plan:
This PR should not change the behavior on gcc, because `CLANG_FORCE_LIBSTDCXX` is ignored when building with gcc.
When rebasing https://github.com/facebook/hhvm/issues/9129 onto this PR, the error of `cannot find -lc++: No such file or directory` should be gone.
Reviewed By: alexeyt
Differential Revision:
D39703809
Pulled By: Atry
fbshipit-source-id:
9da42f74d86ab7c338b4eedd9c98c8b36006ab79