Pass O3 optimization flag to arm and thumb targets

Change-Id: I27b05be6a103ed1064859eff57f5ec87be7bb1be