You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: site/source/docs/compiling/Building-Projects.rst
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -339,7 +339,9 @@ Detecting Emscripten in Preprocessor
339
339
Emscripten provides the following preprocessor macros that can be used to identify the compiler version and platform:
340
340
341
341
* The preprocessor define ``__EMSCRIPTEN__`` is always defined when compiling programs with Emscripten.
342
-
* The preprocessor variables ``__EMSCRIPTEN_major__``, ``__EMSCRIPTEN_minor__`` and ``__EMSCRIPTEN_tiny__`` specify, as integers, the currently used Emscripten compiler version.
342
+
* The preprocessor variables ``__EMSCRIPTEN_major__``, ``__EMSCRIPTEN_minor__``
343
+
and ``__EMSCRIPTEN_tiny__`` are defined in ``emscripten/version.h`` and
344
+
specify, as integers, the currently used Emscripten compiler version.
343
345
* Emscripten behaves like a variant of Unix, so the preprocessor defines ``unix``, ``__unix`` and ``__unix__`` are always present when compiling code with Emscripten.
344
346
* Emscripten uses Clang/LLVM as its underlying codegen compiler, so the preprocessor defines ``__llvm__`` and ``__clang__`` are defined, and the preprocessor defines ``__clang_major__``, ``__clang_minor__`` and ``__clang_patchlevel__`` indicate the version of Clang that is used.
345
347
* Clang/LLVM is GCC-compatible, so the preprocessor defines ``__GNUC__``, ``__GNUC_MINOR__`` and ``__GNUC_PATCHLEVEL__`` are also defined to represent the level of GCC compatibility that Clang/LLVM provides.
0 commit comments