Refactor opt-dist to simplify local building
#115795
Merged
opt-dist to simplify local building
#115795