-
Notifications
You must be signed in to change notification settings - Fork 12
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 #3
Conversation
When building `PerfEvent.hpp` with `libcxx`, compilation fails. This is because we are not including the `sstream` header. This commit adds the missing include, allowing `PerfEvent.hpp` to build with `libcxx`. We ran into this issue while filing: durner/AnyBlob#3
I just filed viktorleis/perfevent#8 to make sure we can get around the nasty include ordering requirement for some of the tests. |
@@ -1,3 +1,7 @@ | |||
// Sadly, the include order matters here. PerfEvent depends on sstream but | |||
// does not include the header. | |||
#include <sstream> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's fix that upstream.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already filed the PR :-P
// Sadly, the include order matters here. PerfEvent depends on sstream but | ||
// does not include the header. | ||
#include <sstream> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's fix that upstream.
I just wanted to do the same. Thanks! |
Contribution Overview
At the moment, AnyBlob can only link against the gnu standard library.
This commit adds a new CMake option
ANYBLOB_LIBCXX_COMPAT
that allowsbuilding AnyBlob while linking against
libcxx
.Detailed Changes
The main changes in this commit are:
when including the libcxx headers, as a result some string headers
were missing in some places.
ThroughputResolver
when building with libcxx. This is themore invasive of the two changes. The
ThroughputResolver
depends on__gnu_pbds::tree
, which is not spported in libcxx. When building inlibcxx compatibility mode, we now remove this resolve completely. In
this case, the
io_uring_socket.cpp
falls back onto the defaultresolver.
To ease reviewing, the PR is split into two commits. The first commit contains
the code changes to get AnyBlob to build with
libcxx
. The second commitcontains the CI changes.
Test Plan
mode.
with
clang-15
and the libcxx compatibility mode.clang-15
andlibc++
, running both unit and integration tests.