unify runtime optimization flags with conditional compilation