restructuring build order to support smarter mms builds