optimize tools/ directory build order to improve parallel building performance