Update compiler flags with memory optimizations

Change-Id: Ifd012f8d4d9de19b2d85ac09d4a04677645188a7