aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/guess.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-11-05 15:52:13 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-11-05 15:52:13 +0200
commit8671b4dc516994b7f070a341c004aab28e525431 (patch)
treeae44903ad4960ed5ace4bcb26401be5dd592ff4f /libbuild2/cc/guess.hxx
parentfb4272e816ad949811f9f8b709771c5aeb646d1f (diff)
Initial Emscripten support
- Target: wasm32-emscripten (wasm32-unknown-emscripten). - Compiler id: clang-emscripten (type clang, variant emscripten, class gcc). - Ability to build executables (.js plus .wasm) and static libraries (.a). Set executable bit on the .js file (so it can be executed with a suitable binfmt interpreter). - Default config.bin.lib for wasm32-emscripten is static instead of both. - Full C++ exception support is enable unless disabled explicitly by the user with -s DISABLE_EXCEPTION_CATCHING=1|2. - The bin module registers the wasm{} target type for wasm32-emscripten.
Diffstat (limited to 'libbuild2/cc/guess.hxx')
-rw-r--r--libbuild2/cc/guess.hxx21
1 files changed, 12 insertions, 9 deletions
diff --git a/libbuild2/cc/guess.hxx b/libbuild2/cc/guess.hxx
index 3c58bec..868e925 100644
--- a/libbuild2/cc/guess.hxx
+++ b/libbuild2/cc/guess.hxx
@@ -19,12 +19,13 @@ namespace build2
//
// Currently recognized compilers and their ids:
//
- // gcc GCC gcc/g++
- // clang Vanilla Clang clang/clang++
- // clang-apple Apple Clang clang/clang++ and the gcc/g++ "alias"
- // msvc Microsoft cl.exe
- // msvc-clang Clang in the cl compatibility mode (clang-cl)
- // icc Intel icc/icpc
+ // gcc GCC gcc/g++
+ // clang Vanilla Clang clang/clang++
+ // clang-apple Apple Clang clang/clang++ and the gcc/g++ "alias"
+ // clang-emscripten Emscripten emcc/em++.
+ // msvc Microsoft cl.exe
+ // msvc-clang Clang in the cl compatibility mode (clang-cl)
+ // icc Intel icc/icpc
//
// Note that the user can provide a custom id with one of the predefined
// types and a custom variant (say 'gcc-tasking').
@@ -83,7 +84,7 @@ namespace build2
//
// Currently defined compiler classes:
//
- // gcc gcc, clang, clang-apple, icc (on non-Windows)
+ // gcc gcc, clang, clang-{apple,emscripten}, icc (on non-Windows)
// msvc msvc, clang-cl, icc (Windows)
//
enum class compiler_class
@@ -117,8 +118,9 @@ namespace build2
//
// A compiler variant may also have a variant version:
//
- // clang-apple A.B[.C] ... {A, B, C, ...}
- // msvc-clang A.B.C[( |-)...] {A, B, C, ...} (native Clang version)
+ // clang-apple A.B[.C] ... {A, B, C, ...}
+ // clang-emscripten A.B.C ... {A, B, C, ...}
+ // msvc-clang A.B.C[( |-)...] {A, B, C, ...} (native Clang version)
//
// Note that the clang-apple variant version is a custom Apple version
// that doesn't correspond to the vanilla Clang version nor is the mapping
@@ -211,6 +213,7 @@ namespace build2
// uclibc
// musl
// dietlibc
+ // emscripten
// other
// none
//