set compiler flags for optimization
fix wifi build