Add a has-fork feature flag and only enable debug-mode tests on systems with fork() support.
These tests turn on debug mode themselves - they don't need to be limited the configurations where the user turns it on.
I don't want the debug tests to be their "own configuration". They should be run in all configurations (except testing the Apple system libc++)
Ok but does that mean that the REQUIRES only belongs on a subset of the tests? Ones with MODULES_DEFINES: _LIBCPP_DEBUG=1 maybe?
I got here (to this change) indirectly. One of our hexagon targets doesn't support waitpid() so we see compilation failures on the tests that include debug_mode_helper.h. When I read this comment regarding system lib I think I misunderstood and assumed that these tests only are necessary for some library configurations.
I can follow-through on this change if you and Eric agree on what it should be. But maybe I will work on a feature test for waitpid (LIBCXX_HAVE_WAITPID?) instead (or in addition) and somehow gate these tests that way.
Changed debug-mode feature to be deactivated when the LIBCXX_TEST_HAVE_FORK option is disabled. This hopefully sidesteps the debate triggered by the previous revision.
Added REQUIRES: debug-mode to libcxx/input.output/filesystems/class.path/path.itr/iterator_db.pass.cpp, this was unintentionally omitted before.