This doesn't work for the case where the failure(s) might be caused by a combination of a subset of the optimisations. That is,
1000 0100 0010 0001
all succeed, but
0101
fails.
A binary search is not possible for these more complex bugs. We had such cases in the reproducible builds project.
For the case where you can assume (subset A exhibits a failure => any superset of A exhibits a failure), then you can just go through all the options (in the OP's case 256) and switch them on, one at a time. Then the running time is 256, not 8.
For more complex cases where you can't assume even that, then you're stuck indeed with 2^256 test cases.