Add optimization and use CC from env