fix modules optimization flags

Change-Id: Ie02f774a64d162d428187e5c7a23f4554d21911a