More optimization flags support

Change-Id: I84259a8137406645570c567293429f817301db54