Generalize build_wrapper to task_wrapper.