[cmake] Pass -O3 when linking.

Gold and bfd ld enable misc optimizations. lld ignores the option for now.