mirror of https://github.com/WebAssembly/wasi-sdk
When building for a web target, there is no stderr. However, the abort implementation in the current CXXABI runtime is implemented with writes to stderr. Since the constructors for default objects call abort, these are rightfully not optimised out from the compiler. However, it is hardly sensible in my opinion to have to include a whole WASI runtime implementation in the browser just to handle more informative aborts by default. To prevent this, compile the cxxabi runtime with NDEBUG and CXXABI_BAREMETAL flags. This is not enough though, as the compiler will still try to instantiate __libcpp_verbose_abort from the stdcxx library. To prevent the compiler from instantiating __libcpp_verbose_abort, clean fix for this is to consistently set _LIBCPP_AVAILABILITY_HAS_VERBOSE_ABORT=0 in the __availability header. This requires forking or patching LLVM.pull/418/head
parent
af429ed157
commit
564d239939
Loading…
Reference in new issue