Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libc++abi] Disable undesired attempts at opening file descriptors #418

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on May 12, 2024

  1. Disable undesired attempts at opening file descriptors

    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.
    infinitesnow committed May 12, 2024
    Configuration menu
    Copy the full SHA
    564d239 View commit details
    Browse the repository at this point in the history