[mamory] clean up build flags