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

Add Libcxx Compatability Mode to AnyBlob #4

Merged
merged 2 commits into from
Nov 28, 2023
Merged

Add Libcxx Compatability Mode to AnyBlob #4

merged 2 commits into from
Nov 28, 2023

Commits on Nov 28, 2023

  1. Add libcxx Compatability Mode

    At the moment, AnyBlob can only link against the gnu standard library.
    This commit adds a new CMake option `ANYBLOB_LIBCXX_COMPAT` that allows
    building AnyBlob and linking against libcxx.
    
    The main changes in this commit are:
    - Missing header includes. We don't bring in the same transitive headers
      when including the libcxx headers, as a result some string headers
      were missing in some places.
    - Remove `ThroughputResolver` when building with libcxx. This is the
      more invasive of the two changes. The `ThroughputResolver` depends on
      `__gnu_pbds::tree`, which is not spported in libcxx. When building in
      libcxx compatibility mode, we now remove this resolve completely. In
      this case, the `io_uring_socket.cpp` falls back onto the default
      resolver.
    
    We have verified that we can build all targets in libcxx compatibility
    mode.
    
    We have verified that both unit and integration tests pass when building
    with `clang-15` and the libcxx compatibility mode.
    wagjamin authored and durner committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    6eafc92 View commit details
    Browse the repository at this point in the history
  2. Add Clang Toolchain to the CI

    This commit adds the clang toolchain to the CI. We turn the main jobs
    into a test matrix that either runs with the clang, or gcc toolchain.
    
    When using the gcc toolchain everything stays as-is. When using the
    clang toolchain we use clang/clang++ as C/C++ compilers, respectively.
    We also build `AnyBlob` using `-DANYBLOB_LIBCXX_COMPAT=1`, which ensures
    that `libcxx` is used as a standard library.
    
    In principle, the test matrix could be even bigger: we could build with
    libcxx and gcc, and gnu c++ and clang. But we don't tests this for now.
    wagjamin authored and durner committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    cc68c99 View commit details
    Browse the repository at this point in the history