Compile an optimized library for the given CPU with the right flags, then link it with the main library.