User Tools

Site Tools


A useful resource on how to detect compilation environment based on predefined macros :

Other ressource :

To list predefined preprocessor macros, echo | g++ -dM -E - | more can be used (g++ can be replaced by other g(cc|++)-like compiler.
For emscripten (based on LLVM), the above command (echo | em++ …) displays macros which are stripped out. The __x86_64__ macro, for example.
computing/compilers/home.txt · Last modified: Fri Dec 6 09:05:21 2019 (06/12/19) by Claude SIMON