When the libcxx test framework is executed within libunwind, there
are no standard C++ headers available (libunwind builds with
-nostdinc++, but doesn't add any libcxx headers to the include path).
Check that a test that includes <iostream> can be compiled before trying
to build and execute a test program that includes it.
Previously, the compile error here would block all libunwind tests from
executing altogether.
Differential Revision: https://reviews.llvm.org/D147630
DEFAULT_FEATURES += [
Feature(name='darwin', when=lambda cfg: '__APPLE__' in compilerMacros(cfg)),
Feature(name='windows', when=lambda cfg: '_WIN32' in compilerMacros(cfg)),
- Feature(name='windows-dll', when=lambda cfg: '_WIN32' in compilerMacros(cfg) and programSucceeds(cfg, """
+ Feature(name='windows-dll', when=lambda cfg: '_WIN32' in compilerMacros(cfg) and sourceBuilds(cfg, """
+ #include <iostream>
+ int main(int, char**) { return 0; }
+ """) and programSucceeds(cfg, """
#include <iostream>
#include <windows.h>
#include <winnt.h>