maflcko / bitcoin-core

MIT License
26 stars 12 forks source link

iwyu libc++ c++20 #81

Closed maflcko closed 2 years ago

maflcko commented 2 years ago
diff --git a/ci/test/00_setup_env_native_tidy.sh b/ci/test/00_setup_env_native_tidy.sh
index 11a12e336..d8efdb219 100755
--- a/ci/test/00_setup_env_native_tidy.sh
+++ b/ci/test/00_setup_env_native_tidy.sh
@@ -8,12 +8,12 @@ export LC_ALL=C.UTF-8

 export DOCKER_NAME_TAG="ubuntu:22.04"
 export CONTAINER_NAME=ci_native_tidy
-export PACKAGES="clang libclang-dev llvm-dev clang-tidy bear cmake libevent-dev libboost-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev systemtap-sdt-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libqrencode-dev libsqlite3-dev libdb++-dev"
-export NO_DEPENDS=1
+export PACKAGES="clang libclang-dev llvm-dev libc++abi-dev libc++-dev clang-tidy bear cmake libevent-dev libboost-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev systemtap-sdt-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libqrencode-dev libsqlite3-dev libdb++-dev"
+export DEP_OPTS="CC=clang CXX='clang++ -stdlib=libc++' CXX_STANDARD=c++20"
 export RUN_UNIT_TESTS=false
 export RUN_FUNCTIONAL_TESTS=false
 export RUN_FUZZ_TESTS=false
 export RUN_TIDY=true
 export GOAL="install"
-export BITCOIN_CONFIG="CC=clang CXX=clang++ --enable-c++20 --with-incompatible-bdb --disable-hardening CFLAGS='-O0 -g0' CXXFLAGS='-O0 -g0'"
+export BITCOIN_CONFIG="CC=clang CXX='clang++ -stdlib=libc++' --enable-c++20 --with-incompatible-bdb --disable-hardening CFLAGS='-O0 -g0' CXXFLAGS='-O0 -g0'"
 export CCACHE_SIZE=200M
diff --git a/ci/test/06_script_b.sh b/ci/test/06_script_b.sh
index 5bdb392ba..d99ed8d40 100755
--- a/ci/test/06_script_b.sh
+++ b/ci/test/06_script_b.sh
@@ -37,9 +37,10 @@ fi
 if [ "${RUN_TIDY}" = "true" ]; then
   set -eo pipefail
   export P_CI_DIR="${BASE_BUILD_DIR}/bitcoin-$HOST/src/"
-  ( CI_EXEC run-clang-tidy -quiet "${MAKEJOBS}" ) | grep -C5 "error"
   export P_CI_DIR="${BASE_BUILD_DIR}/bitcoin-$HOST/"
   CI_EXEC "python3 ${DIR_IWYU}/include-what-you-use/iwyu_tool.py"\
+          " src/bitcoin-tx.cpp"\
+          " src/zmq"\
           " src/compat"\
           " src/dbwrapper.cpp"\
           " src/init"\
diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk
index 563848c39..e3625d97f 100644
--- a/depends/packages/boost.mk
+++ b/depends/packages/boost.mk
@@ -1,8 +1,8 @@
 package=boost
-$(package)_version=1.77.0
+$(package)_version=1.80.0
 $(package)_download_path=https://boostorg.jfrog.io/artifactory/main/release/$($(package)_version)/source/
 $(package)_file_name=boost_$(subst .,_,$($(package)_version)).tar.bz2
-$(package)_sha256_hash=fc9f85fc030e233142908241af7a846e60630aa7388de9a5fafb1f3a26840854
+$(package)_sha256_hash=1e19565d82e43bc59209a168f5ac899d3ba471d55c7610c677d4ccf2c9c500c0

 define $(package)_stage_cmds
   mkdir -p $($(package)_staging_prefix_dir)/include && \
diff --git a/doc/dependencies.md b/doc/dependencies.md
index 8b8259ab0..c7ad5abf2 100644
--- a/doc/dependencies.md
+++ b/doc/dependencies.md
@@ -17,7 +17,7 @@ You can find installation instructions in the `build-*.md` file for your platfor

 | Dependency | Releases | Version used | Minimum required | Runtime |
 | --- | --- | --- | --- | --- |
-| [Boost](../depends/packages/boost.mk) | [link](https://www.boost.org/users/download/) | [1.77.0](https://github.com/bitcoin/bitcoin/pull/24383) | [1.64.0](https://github.com/bitcoin/bitcoin/pull/22320) | No |
+| [Boost](../depends/packages/boost.mk) | [link](https://www.boost.org/users/download/) | [1.80.0](https://github.com/bitcoin/bitcoin/pull/25873) | [1.64.0](https://github.com/bitcoin/bitcoin/pull/22320) | No |
 | [libevent](../depends/packages/libevent.mk) | [link](https://github.com/libevent/libevent/releases) | [2.1.12-stable](https://github.com/bitcoin/bitcoin/pull/21991) | [2.1.8](https://github.com/bitcoin/bitcoin/pull/24681) | No |
 | glibc | [link](https://www.gnu.org/software/libc/) | N/A | [2.18](https://github.com/bitcoin/bitcoin/pull/23511) | Yes |
 | Linux Kernel | [link](https://www.kernel.org/) | N/A | 3.2.0 | Yes |

In file included from primitives/transaction.cpp:6:
In file included from ./primitives/transaction.h:9:
./consensus/amount.h:9:10: fatal error: 'cstdint' file not found
#include <cstdint>
         ^~~~~~~~~

^CTraceback (most recent call last):
  File "/bitcoin-core/ci/scratch/iwyu/include-what-you-use/iwyu_tool.py", line 500, in <module>