migrate all stages of linking to module based setup