When the Mac switched to Intel, Apple stepped up to the challenge of providing executables for one operating system on two different processor architectures. Their solution is to generate an instance of each object file for each target platform and then link them all together into one single binary with a short bootstrap that will branch to the correct entry point for your current platform.Why not provide a similar option for Windows/Linux binaries? Let the compiler pure, processor-targetted object files for a set of different platforms, and then have the linker bring them all together with a bootstrap that selects which _main to hit based on the CPU the code is executed on. I realize that this bloats the executable size, but our application is tiny - 1.7Mb - compared to the data footprint, and I'd be more than happy for that to bloat up to 10 or 17Mb if the resulting application squeezed every last drop out of the user's CPU. And it might actually encourage more developers to turn on those "Intel only" options - since they can offer one executable that will take full advantage of intel for the cost of a single CPU caps check at startup rather than thousands of times a second.
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.