As seen in the testcase, passing objects to custom_target does not work
if headers are passed extract_objects(), or if extract_all_objects() is used
and the sources include any header files. To fix this, use the code that
already exists for unity build to filter out the nonexistent ".h.o" files.
This already gives for free the handling of genlist, which was mentioned
in a TODO comment.
QEMU would like to use the result of extract_objects in a custom_target;
examples are using objcopy, or using the object files as the key to look
up command line arguments in compile_commands.json. This is slightly
peculiar and not covered by the test suite, but it works; in order to avoid
regressions, add a test case and document it.
D lang compilers have an option -release (or similar) which turns off
asserts, contracts, and other runtime type checking. This patch wires
that up to the b_ndebug flag.
Fixes#7082
The library from which we extract should have multiple sources
from which we choose a strict subset otherwise we're testing almost the
same case extracting all the objects.
This exposes a bug in how we were doing extract checking for unity
builds.