From fd2a10c27ca8eaa8adbe632091d3356bec06ca9e Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Mon, 12 Oct 2020 17:58:27 +0100 Subject: [PATCH] Add web assembly support (emscripten/wasm). --- .../config/detail/select_platform_config.hpp | 5 +++++ include/boost/config/platform/wasm.hpp | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 include/boost/config/platform/wasm.hpp diff --git a/include/boost/config/detail/select_platform_config.hpp b/include/boost/config/detail/select_platform_config.hpp index b36eca57..dbff74aa 100644 --- a/include/boost/config/detail/select_platform_config.hpp +++ b/include/boost/config/detail/select_platform_config.hpp @@ -88,6 +88,11 @@ #elif defined(__CloudABI__) // Nuxi CloudABI: # define BOOST_PLATFORM_CONFIG "boost/config/platform/cloudabi.hpp" + +#elif defined (__wasm__) +// Web assembly: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/wasm.hpp" + #else # if defined(unix) \ diff --git a/include/boost/config/platform/wasm.hpp b/include/boost/config/platform/wasm.hpp new file mode 100644 index 00000000..c307812d --- /dev/null +++ b/include/boost/config/platform/wasm.hpp @@ -0,0 +1,17 @@ +// (C) Copyright John Maddock 2020. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// WASM specific config options: + +#define BOOST_PLATFORM "Wasm" + +// boilerplate code: +#include +// +// fenv lacks the C++11 macros: +// +#define BOOST_NO_FENV_H