Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> After compiling the game with the flag -Dcpu=baseline, the binary contained only x86-64-v1 instructions, allowing my friend to play the game.

Feels like the startup code should actually verify that it's running on a suitable CPU rather than just crashing.

I don't think C/C++ or Rust do this either but they should!



pretty much no language do this by default. however, most languages target the -v1 instruction set in 'release' or optimized mode. (e.g. Rust does this, and AFAIK GCC and clang both do this for C/C++)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: