Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
mostly done by codex-cli
it builds successfully on my machine and all tests pass.
for that, I needed to build boost and libfuzzer from sources using libc++, the CI here may not be doing that
3 third_party libraries also needed to be patched (intx, evmc, sikpre). the submodule commits referenced in this PR are in forks under my github account.
ideally, our code should build with both libc++ and libstdc++
Detailed build instructions:
• Prereqs
libbacktrace
Boost (1.83) with libc++ + libbacktrace
cxxflags="-stdlib=libc++ -fPIC -O2 -g -DBOOST_STACKTRACE_USE_BACKTRACE -I$HOME/libbacktrace-libcxx/include"
linkflags="-stdlib=libc++ -L$HOME/libbacktrace-libcxx/lib -lbacktrace"
libFuzzer runtime (compiler-rt only)
-DCMAKE_INSTALL_PREFIX=$HOME/libfuzzer-libcxx -DCMAKE_BUILD_TYPE=Release
-DCMAKE_C_COMPILER=clang-19 -DCMAKE_CXX_COMPILER=clang++-19
-DCMAKE_C_FLAGS="-stdlib=libc++ -O2 -fPIC" -DCMAKE_CXX_FLAGS="-stdlib=libc++ -O2 -fPIC"
-DCOMPILER_RT_BUILD_LIBFUZZER=ON -DCOMPILER_RT_BUILD_SANITIZERS=OFF -DCOMPILER_RT_BUILD_PROFILE=OFF
-DCOMPILER_RT_BUILD_BUILTINS=OFF -DCOMPILER_RT_BUILD_MEMPROF=OFF -DCOMPILER_RT_BUILD_GWP_ASAN=OFF
Project configure/build
From repo root:
export CC=clang-19
export CXX=clang++-19
export CMAKE_BUILD_TYPE=RelWithDebInfo
export CMAKE_PREFIX_PATH=$HOME/boost-libcxx
export LIBBACKTRACE_ROOT=$HOME/libbacktrace-libcxx
export LIBFUZZER_RUNTIME_PATH=$HOME/libfuzzer-libcxx/lib/linux/libclang_rt.fuzzer-x86_64.a
export CFLAGS="-march=haswell -stdlib=libc++"
export CXXFLAGS="-march=haswell -stdlib=libc++"
./scripts/configure.sh
./scripts/build.sh
(The configure script forwards the environment-set flags and installs -include category/core/char_traits.hpp automatically.)
Testing