News for hackers. Stuff that matters.
Re:How to build highly-debuggable C++ binaries by josephg on Monday July 29, 2024 @03:55PM (#41103217)
Yeah -march=native is amazing. I use it when compiling & benchmarking rust code.

But - to anyone reading this later - please don’t do this blindly. You probably never want to distribute binaries with this flag set. It enables all the features available on the host CPU. So your build will change depending on the physical cpu you have installed. If you have a modern amd cpu, it may enable avx512 extensions and make your binary unusable on many Intel CPUs.

There are no comments on this comment yet.