diff --git a/.github/workflows/ci-expanded.yml b/.github/workflows/ci-expanded.yml
index f0ec8dd7a..39c7bae94 100644
--- a/.github/workflows/ci-expanded.yml
+++ b/.github/workflows/ci-expanded.yml
@@ -318,7 +318,29 @@ jobs:
coverage: ""
package: "gcc-s390x-linux-gnu g++-s390x-linux-gnu qemu-user-static"
host: "s390x-linux-gnu"
- options: "--enable-isystem --build-skip-test-run"
+ options: "--enable-isystem"
+
+ - image: ubuntu-24.04
+ config: "release"
+ link: "static"
+ cc: "powerpc64le-linux-gnu-gcc"
+ cxx: "powerpc64le-linux-gnu-g++"
+ flags: ""
+ coverage: ""
+ package: "gcc-powerpc64le-linux-gnu g++-powerpc64le-linux-gnu qemu-user-static"
+ host: "powerpc64le-linux-gnu"
+ options: "--enable-isystem"
+
+ - image: ubuntu-24.04
+ config: "release"
+ link: "static"
+ cc: "powerpc64-linux-gnu-gcc"
+ cxx: "powerpc64-linux-gnu-g++"
+ flags: ""
+ coverage: ""
+ package: "gcc-powerpc64-linux-gnu g++-powerpc64-linux-gnu qemu-user-static"
+ host: "powerpc64-linux-gnu"
+ options: "--enable-isystem"
- image: macos-26-intel
config: "release"
@@ -356,9 +378,9 @@ jobs:
cxx: "arm-linux-gnueabihf-g++"
flags: ""
coverage: ""
- package: "gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf"
+ package: "gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf qemu-user-static"
host: "arm-linux-gnueabihf"
- options: "--enable-isystem --build-skip-test-run"
+ options: "--enable-isystem"
- image: ubuntu-26.04
config: "release"
@@ -371,6 +393,42 @@ jobs:
host: "x86_64-w64-mingw32"
options: "--enable-isystem --build-skip-test-run"
+ - image: ubuntu-24.04
+ config: "release"
+ link: "static"
+ cc: "clang-18 --target=x86_64-unknown-freebsd15.1 --sysroot=/tmp/sysroot -fuse-ld=lld -Wno-unused-command-line-argument"
+ cxx: "clang++-18 --target=x86_64-unknown-freebsd15.1 --sysroot=/tmp/sysroot -stdlib=libc++ -fuse-ld=lld -Wno-unused-command-line-argument"
+ flags: ""
+ coverage: ""
+ package: "lld-18"
+ host: "x86_64-unknown-freebsd15.1"
+ sysroot: "https://download.freebsd.org/releases/amd64/15.1-RELEASE/base.txz 3768988b151c20f965679062b065c63a977d6bbb9f47fd83695ec2c40790c18f"
+ options: "--enable-isystem --build-skip-test-run"
+
+ - image: ubuntu-24.04
+ config: "release"
+ link: "static"
+ cc: "clang-18 --target=x86_64-unknown-openbsd7.9 --sysroot=/tmp/sysroot -fuse-ld=lld -Wno-unused-command-line-argument"
+ cxx: "clang++-18 --target=x86_64-unknown-openbsd7.9 --sysroot=/tmp/sysroot -stdlib=libc++ -fuse-ld=lld -Wno-unused-command-line-argument"
+ flags: ""
+ coverage: ""
+ package: "lld-18"
+ host: "x86_64-unknown-openbsd7.9"
+ sysroot: "https://cdn.openbsd.org/pub/OpenBSD/7.9/amd64/base79.tgz 923d2e03f06408d50d4848334398c6d04b5514dcac7917badfc178a0eef248de https://cdn.openbsd.org/pub/OpenBSD/7.9/amd64/comp79.tgz 21a67af20aebcabf85b09f4206fc95b4cae0a35d42b154b976f0159f457724f9"
+ options: "--enable-isystem --build-skip-test-run"
+
+ - image: ubuntu-24.04
+ config: "release"
+ link: "static"
+ cc: "clang-18 --target=x86_64-unknown-netbsd11.0 --sysroot=/tmp/sysroot -fuse-ld=lld -Wno-unused-command-line-argument"
+ cxx: "clang++-18 --target=x86_64-unknown-netbsd11.0 --sysroot=/tmp/sysroot -stdlib=libstdc++ -nostdinc++ -isystem /tmp/sysroot/gcc14/include/c++ -isystem /tmp/sysroot/gcc14/include/c++/x86_64--netbsd -L/tmp/sysroot/gcc14/lib -fuse-ld=lld -Wno-unused-command-line-argument -lgcc_s"
+ flags: ""
+ coverage: ""
+ package: "lld-18"
+ host: "x86_64-unknown-netbsd11.0"
+ sysroot: "https://cdn.netbsd.org/pub/NetBSD/NetBSD-11.0/amd64/binary/sets/base.tar.xz 06bc97d2ea7cbb7fea55e8b5fff17e26b642ebe3ca6475202954658e229e303c https://cdn.netbsd.org/pub/NetBSD/NetBSD-11.0/amd64/binary/sets/comp.tar.xz e14cf9f6ea080d90a148918a4f73a3696c473c60a435985f4316a9033abc0b3e https://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/x86_64/11.0_2026Q3/All/gcc14-14.3.0nb3.tgz 8fca3189af23c742b84641c8d861cf1bf485576265da132fd2ee7bb818e6bc50"
+ options: "--enable-isystem --build-skip-test-run"
+
runs-on: ${{ matrix.image }}
env:
@@ -493,6 +551,21 @@ jobs:
echo "LDFLAGS=-Wl,-rpath,${{ github.workspace }}/prefix/lib" >> $GITHUB_ENV
fi
+ - name: Prepare sysroot [cross]
+ if: ${{ matrix.sysroot }}
+ shell: bash
+ run: |
+ mkdir -p /tmp/sysroot
+ set -- ${{ matrix.sysroot }}
+ while [[ $# -gt 1 ]]; do
+ curl --fail --silent --show-error --location --output sysroot.archive "$1"
+ echo "$2 sysroot.archive" | sha256sum --check
+ tar -xf sysroot.archive -C /tmp/sysroot
+ rm sysroot.archive
+ shift 2
+ done
+ find /tmp/sysroot -name '*.la' -delete
+
- name: Verify emulation [cross]
if: ${{ matrix.host }}
shell: bash
@@ -508,12 +581,14 @@ jobs:
- name: Execute installation
shell: bash
working-directory: 'libbitcoin-node'
+ env:
+ MAKEFLAGS: "${{ matrix.host && 'TESTS=' || '' }}"
run: >
./builds/gnu/install-gnu.sh
--build-use-local-src
--build-src-dir="${{ github.workspace }}"
--prefix="${{ github.workspace }}/prefix"
- --build-post-install-clean
+ ${{ !matrix.host && '--build-post-install-clean' || '' }}
--build-obj-dir="obj"
--build-obj-dir-relative
--build-config="${{ matrix.config }}"
@@ -521,6 +596,219 @@ jobs:
${{ matrix.options }}
${{ matrix.host && format('--host={0}', matrix.host) || '' }}
+ - name: Execute tests [cross]
+ if: ${{ matrix.host && !contains(matrix.options, '--build-skip-test') }}
+ shell: bash
+ working-directory: 'libbitcoin-node/obj/builds/gnu'
+ run: >
+ ./test/libbitcoin-node-test
+ --log_level=test_suite
+ --report_level=short
+ --show_progress=no
+ --detect_memory_leak=0
+ --build_info=yes
+
+ - name: Coverage calculation
+ if: ${{ matrix.coverage == 'lcov' }}
+ shell: bash
+ working-directory: 'libbitcoin-node'
+ run: |
+ lcov --ignore-errors version,gcov,mismatch,mismatch --directory . --capture --output-file coverage.info
+ lcov --ignore-errors unused --extract coverage.info "${{ github.workspace }}/libbitcoin-node/include/*" "${{ github.workspace }}/libbitcoin-node/src/*" --output-file coverage.info
+
+ - name: Coveralls.io upload
+ if: ${{ matrix.coverage == 'lcov' }}
+ shell: bash
+ working-directory: 'libbitcoin-node'
+ env:
+ COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ curl -sLO https://github.com/coverallsapp/coverage-reporter/releases/latest/download/coveralls-linux-x86_64.tar.gz
+ curl -sLO https://github.com/coverallsapp/coverage-reporter/releases/latest/download/coveralls-checksums.txt
+ grep -F coveralls-linux-x86_64.tar.gz coveralls-checksums.txt | sha256sum -c
+ tar -xzf coveralls-linux-x86_64.tar.gz
+ ./coveralls report --format lcov coverage.info
+
+ - name: Test artifact collection
+ if: failure()
+ shell: bash
+ working-directory: ${{ github.workspace }}
+ run: |
+ if [[ -e "libbitcoin-system/obj/Testing/Temporary/LastTest.log" ]]; then
+ cp "libbitcoin-system/obj/Testing/Temporary/LastTest.log" libbitcoin-system-LastTest.errors
+ fi
+ if [[ -e "libbitcoin-system/obj/test-suite.log" ]]; then
+ cp "libbitcoin-system/obj/test-suite.log" libbitcoin-system-test-suite.errors
+ fi
+ if [[ -e "libbitcoin-system/obj/test.log" ]]; then
+ cp "libbitcoin-system/obj/test.log" libbitcoin-system-test.errors
+ fi
+ if [[ -e "libbitcoin-database/obj/Testing/Temporary/LastTest.log" ]]; then
+ cp "libbitcoin-database/obj/Testing/Temporary/LastTest.log" libbitcoin-database-LastTest.errors
+ fi
+ if [[ -e "libbitcoin-database/obj/test-suite.log" ]]; then
+ cp "libbitcoin-database/obj/test-suite.log" libbitcoin-database-test-suite.errors
+ fi
+ if [[ -e "libbitcoin-database/obj/test.log" ]]; then
+ cp "libbitcoin-database/obj/test.log" libbitcoin-database-test.errors
+ fi
+ if [[ -e "libbitcoin-network/obj/Testing/Temporary/LastTest.log" ]]; then
+ cp "libbitcoin-network/obj/Testing/Temporary/LastTest.log" libbitcoin-network-LastTest.errors
+ fi
+ if [[ -e "libbitcoin-network/obj/test-suite.log" ]]; then
+ cp "libbitcoin-network/obj/test-suite.log" libbitcoin-network-test-suite.errors
+ fi
+ if [[ -e "libbitcoin-network/obj/test.log" ]]; then
+ cp "libbitcoin-network/obj/test.log" libbitcoin-network-test.errors
+ fi
+ if [[ -e "libbitcoin-node/obj/Testing/Temporary/LastTest.log" ]]; then
+ cp "libbitcoin-node/obj/Testing/Temporary/LastTest.log" libbitcoin-node-LastTest.errors
+ fi
+ if [[ -e "libbitcoin-node/obj/test-suite.log" ]]; then
+ cp "libbitcoin-node/obj/test-suite.log" libbitcoin-node-test-suite.errors
+ fi
+ if [[ -e "libbitcoin-node/obj/test.log" ]]; then
+ cp "libbitcoin-node/obj/test.log" libbitcoin-node-test.errors
+ fi
+
+ - name: Test artifact upload
+ if: failure()
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
+ with:
+ name: testlogs
+ path: ${{ github.workspace }}/*.errors
+ retention-days: 1
+ if-no-files-found: warn
+
+ musl:
+ if: github.event_name != 'pull_request' || github.event.action != 'closed'
+
+ strategy:
+ fail-fast: false
+
+ matrix:
+ include:
+ - image: ubuntu-24.04
+ config: "release"
+ link: "static"
+ cc: "gcc"
+ cxx: "g++"
+ flags: ""
+ coverage: ""
+ options: "--enable-isystem"
+
+ runs-on: ${{ matrix.image }}
+ container:
+ image: alpine:3.24
+ volumes:
+ - ${{ github.workspace }}:${{ github.workspace }}
+
+ env:
+ CC: '${{ matrix.cc }}'
+ CXX: '${{ matrix.cxx }}'
+ CFLAGS: '${{ matrix.flags }}'
+ CXXFLAGS: '${{ matrix.flags }}'
+
+ steps:
+ - name: Prepare toolchain [alpine]
+ shell: sh
+ run: |
+ apk add --no-cache bash git build-base autoconf automake libtool pkgconf linux-headers ${{ matrix.package || '' }}
+
+ - name: Get branch name
+ id: get-branch
+ shell: bash
+ run: |
+ if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then
+ echo "branch=$GITHUB_HEAD_REF" >> $GITHUB_OUTPUT
+ else
+ echo "branch=$GITHUB_REF_NAME" >> $GITHUB_OUTPUT
+ fi
+
+ - name: Checkout repository [libbitcoin-system]
+ id: checkout-libbitcoin-system
+ continue-on-error: true
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ fetch-depth: 1
+ path: 'libbitcoin-system'
+ ref: ${{ steps.get-branch.outputs.branch }}
+ repository: ${{ github.repository_owner }}/libbitcoin-system
+
+ - name: Checkout repository [libbitcoin-system] cleanup on failure
+ continue-on-error: true
+ if: steps.checkout-libbitcoin-system.outcome == 'failure'
+ shell: bash
+ run: |
+ rm -rf ${{ github.workspace }}/libbitcoin-system
+
+
+ - name: Checkout repository [libbitcoin-database]
+ id: checkout-libbitcoin-database
+ continue-on-error: true
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ fetch-depth: 1
+ path: 'libbitcoin-database'
+ ref: ${{ steps.get-branch.outputs.branch }}
+ repository: ${{ github.repository_owner }}/libbitcoin-database
+
+ - name: Checkout repository [libbitcoin-database] cleanup on failure
+ continue-on-error: true
+ if: steps.checkout-libbitcoin-database.outcome == 'failure'
+ shell: bash
+ run: |
+ rm -rf ${{ github.workspace }}/libbitcoin-database
+
+
+ - name: Checkout repository [libbitcoin-network]
+ id: checkout-libbitcoin-network
+ continue-on-error: true
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ fetch-depth: 1
+ path: 'libbitcoin-network'
+ ref: ${{ steps.get-branch.outputs.branch }}
+ repository: ${{ github.repository_owner }}/libbitcoin-network
+
+ - name: Checkout repository [libbitcoin-network] cleanup on failure
+ continue-on-error: true
+ if: steps.checkout-libbitcoin-network.outcome == 'failure'
+ shell: bash
+ run: |
+ rm -rf ${{ github.workspace }}/libbitcoin-network
+
+
+ - name: Checkout repository [libbitcoin-node]
+ id: checkout-libbitcoin-node
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ fetch-depth: 1
+ path: 'libbitcoin-node'
+ repository: ${{ github.repository }}
+
+ - name: Environmental Computation
+ shell: bash
+ run: |
+ if [[ "${{ matrix.link }}" == "dynamic" ]]; then
+ echo "LDFLAGS=-Wl,-rpath,${{ github.workspace }}/prefix/lib" >> $GITHUB_ENV
+ fi
+
+ - name: Execute installation
+ shell: bash
+ working-directory: 'libbitcoin-node'
+ run: >
+ ./builds/gnu/install-gnu.sh
+ --build-use-local-src
+ --build-src-dir="${{ github.workspace }}"
+ --prefix="${{ github.workspace }}/prefix"
+ --build-post-install-clean
+ --build-obj-dir="obj"
+ --build-obj-dir-relative
+ --build-config="${{ matrix.config }}"
+ --build-link="${{ matrix.link }}"
+ ${{ matrix.options }}
+
- name: Coverage calculation
if: ${{ matrix.coverage == 'lcov' }}
shell: bash
@@ -865,6 +1153,39 @@ jobs:
package: "g++-16 gcc-16"
options: ""
+ - image: ubuntu-24.04
+ config: "release"
+ link: "static"
+ cc: "clang-18 --target=x86_64-unknown-freebsd15.1 --sysroot=/tmp/sysroot -fuse-ld=lld -Wno-unused-command-line-argument"
+ cxx: "clang++-18 --target=x86_64-unknown-freebsd15.1 --sysroot=/tmp/sysroot -stdlib=libc++ -fuse-ld=lld -Wno-unused-command-line-argument"
+ flags: ""
+ coverage: ""
+ package: "lld-18"
+ sysroot: "https://download.freebsd.org/releases/amd64/15.1-RELEASE/base.txz 3768988b151c20f965679062b065c63a977d6bbb9f47fd83695ec2c40790c18f"
+ options: "--build-skip-test-run -DCMAKE_SYSTEM_NAME=FreeBSD -DCMAKE_SYSTEM_PROCESSOR=x86_64"
+
+ - image: ubuntu-24.04
+ config: "release"
+ link: "static"
+ cc: "clang-18 --target=x86_64-unknown-openbsd7.9 --sysroot=/tmp/sysroot -fuse-ld=lld -Wno-unused-command-line-argument"
+ cxx: "clang++-18 --target=x86_64-unknown-openbsd7.9 --sysroot=/tmp/sysroot -stdlib=libc++ -fuse-ld=lld -Wno-unused-command-line-argument"
+ flags: ""
+ coverage: ""
+ package: "lld-18"
+ sysroot: "https://cdn.openbsd.org/pub/OpenBSD/7.9/amd64/base79.tgz 923d2e03f06408d50d4848334398c6d04b5514dcac7917badfc178a0eef248de https://cdn.openbsd.org/pub/OpenBSD/7.9/amd64/comp79.tgz 21a67af20aebcabf85b09f4206fc95b4cae0a35d42b154b976f0159f457724f9"
+ options: "--build-skip-test-run -DCMAKE_SYSTEM_NAME=OpenBSD -DCMAKE_SYSTEM_PROCESSOR=x86_64"
+
+ - image: ubuntu-24.04
+ config: "release"
+ link: "static"
+ cc: "clang-18 --target=x86_64-unknown-netbsd11.0 --sysroot=/tmp/sysroot -fuse-ld=lld -Wno-unused-command-line-argument"
+ cxx: "clang++-18 --target=x86_64-unknown-netbsd11.0 --sysroot=/tmp/sysroot -stdlib=libstdc++ -nostdinc++ -isystem /tmp/sysroot/gcc14/include/c++ -isystem /tmp/sysroot/gcc14/include/c++/x86_64--netbsd -L/tmp/sysroot/gcc14/lib -fuse-ld=lld -Wno-unused-command-line-argument -lgcc_s"
+ flags: ""
+ coverage: ""
+ package: "lld-18"
+ sysroot: "https://cdn.netbsd.org/pub/NetBSD/NetBSD-11.0/amd64/binary/sets/base.tar.xz 06bc97d2ea7cbb7fea55e8b5fff17e26b642ebe3ca6475202954658e229e303c https://cdn.netbsd.org/pub/NetBSD/NetBSD-11.0/amd64/binary/sets/comp.tar.xz e14cf9f6ea080d90a148918a4f73a3696c473c60a435985f4316a9033abc0b3e https://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/x86_64/11.0_2026Q3/All/gcc14-14.3.0nb3.tgz 8fca3189af23c742b84641c8d861cf1bf485576265da132fd2ee7bb818e6bc50"
+ options: "--build-skip-test-run -DCMAKE_SYSTEM_NAME=NetBSD -DCMAKE_SYSTEM_PROCESSOR=x86_64"
+
runs-on: ${{ matrix.image }}
env:
@@ -986,6 +1307,21 @@ jobs:
echo "LDFLAGS=-Wl,-rpath,${{ github.workspace }}/prefix/lib" >> $GITHUB_ENV
fi
+ - name: Prepare sysroot [cross]
+ if: ${{ matrix.sysroot }}
+ shell: bash
+ run: |
+ mkdir -p /tmp/sysroot
+ set -- ${{ matrix.sysroot }}
+ while [[ $# -gt 1 ]]; do
+ curl --fail --silent --show-error --location --output sysroot.archive "$1"
+ echo "$2 sysroot.archive" | sha256sum --check
+ tar -xf sysroot.archive -C /tmp/sysroot
+ rm sysroot.archive
+ shift 2
+ done
+ find /tmp/sysroot -name '*.la' -delete
+
- name: Execute installation
shell: bash
working-directory: 'libbitcoin-node'
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 175089cfb..93e1ba4b0 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -162,7 +162,7 @@ jobs:
cxx: "arm-linux-gnueabihf-g++"
flags: ""
coverage: ""
- package: "gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf"
+ package: "gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf qemu-user-static"
host: "arm-linux-gnueabihf"
options: "--enable-isystem --build-skip-test-run"
diff --git a/builds/cmake/CMakeLists.txt b/builds/cmake/CMakeLists.txt
index 9f3b84ced..a6c17485a 100644
--- a/builds/cmake/CMakeLists.txt
+++ b/builds/cmake/CMakeLists.txt
@@ -91,6 +91,13 @@ if ( MSVC )
_WIN32_WINNT=0x0A00 )
endif()
+# Link POSIX threads on BSD.
+if ( CMAKE_SYSTEM_NAME MATCHES "BSD" )
+ set( THREADS_PREFER_PTHREAD_FLAG ON )
+ find_package( Threads REQUIRED )
+ link_libraries( Threads::Threads )
+endif()
+
include(CheckCCompilerFlag)
include(CheckCXXCompilerFlag)
include(CheckCXXSourceCompiles)
diff --git a/builds/cmake/install-cmake.sh b/builds/cmake/install-cmake.sh
index b4f49ffd6..522bf6884 100755
--- a/builds/cmake/install-cmake.sh
+++ b/builds/cmake/install-cmake.sh
@@ -176,37 +176,37 @@ main()
CONFIGURE_OPTIONS_ORIGINAL=("$@")
CONFIGURE_OPTIONS=("$@")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-libsecp256k1/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-src-dir=*/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-obj-dir=*/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-obj-dir-relative/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-limit=*/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-config=*/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-link=*/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-full-repositories/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-post-install-clean/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-skip-tests/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-skip-test-run/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-parallel=*/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-use-local-src/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--prefix=*/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-optimized/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--noninteractive/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--verbose/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--help/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#-h/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-aes/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-sha2/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-sha3/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-avx2/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-avx512/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-avx512ifma/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-avxifma/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-shani/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-sha512/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-sse41/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-aesni/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-vaes/}")
+ remove_configure_option "--build-libsecp256k1"
+ remove_configure_option "--build-src-dir=*"
+ remove_configure_option "--build-obj-dir=*"
+ remove_configure_option "--build-obj-dir-relative"
+ remove_configure_option "--build-limit=*"
+ remove_configure_option "--build-config=*"
+ remove_configure_option "--build-link=*"
+ remove_configure_option "--build-full-repositories"
+ remove_configure_option "--build-post-install-clean"
+ remove_configure_option "--build-skip-tests"
+ remove_configure_option "--build-skip-test-run"
+ remove_configure_option "--build-parallel=*"
+ remove_configure_option "--build-use-local-src"
+ remove_configure_option "--prefix=*"
+ remove_configure_option "--hardware-optimized"
+ remove_configure_option "--noninteractive"
+ remove_configure_option "--verbose"
+ remove_configure_option "--help"
+ remove_configure_option "-h"
+ remove_configure_option "--hardware-aes"
+ remove_configure_option "--hardware-sha2"
+ remove_configure_option "--hardware-sha3"
+ remove_configure_option "--hardware-avx2"
+ remove_configure_option "--hardware-avx512"
+ remove_configure_option "--hardware-avx512ifma"
+ remove_configure_option "--hardware-avxifma"
+ remove_configure_option "--hardware-shani"
+ remove_configure_option "--hardware-sha512"
+ remove_configure_option "--hardware-sse41"
+ remove_configure_option "--hardware-aesni"
+ remove_configure_option "--hardware-vaes"
CONFIGURE_OPTIONS_CMAKE=("${CONFIGURE_OPTIONS[@]}")
msg_verbose "*** ARGUMENTS: ${CONFIGURE_OPTIONS_ORIGINAL[*]}"
msg_verbose "*** SANITIZED: ${CONFIGURE_OPTIONS[*]}"
@@ -369,7 +369,7 @@ main()
if [[ -z "${PARALLEL}" ]]; then
if [[ ${OS} == Linux ]]; then
PARALLEL=$(nproc)
- elif [[ ${OS} == Darwin ]] || [[ ${OS} == OpenBSD ]]; then
+ elif [[ ${OS} == Darwin ]] || [[ ${OS} == *BSD ]]; then
PARALLEL=$(sysctl -n hw.ncpu)
elif [[ ${OS} == MINGW* ]] || [[ ${OS} == MSYS* ]]; then
PARALLEL=${NUMBER_OF_PROCESSORS}
@@ -385,15 +385,13 @@ main()
# state rationalization of standard build variables
- if [[ ${OS} == OpenBSD ]]; then
+ if [[ ${OS} == *BSD ]]; then
make() { gmake "$@"; }
fi
if [[ -z "${STDLIB}" ]]; then
if [[ ${OS} == Darwin ]]; then
STDLIB="c++"
- elif [[ ${OS} == OpenBSD ]]; then
- STDLIB="estdc++"
else
STDLIB="stdc++"
fi
@@ -404,8 +402,6 @@ main()
if [[ -z "${CC}" ]]; then
if [[ ${OS} == Darwin ]]; then
export CC="clang"
- elif [[ ${OS} == OpenBSD ]]; then
- export CC="egcc"
fi
else
msg_verbose "CC using defined value '${CC}'"
@@ -414,8 +410,6 @@ main()
if [[ -z "${CXX}" ]]; then
if [[ ${OS} == Darwin ]]; then
export CXX="clang++"
- elif [[ ${OS} == OpenBSD ]]; then
- export CXX="eg++"
fi
else
msg_verbose "CXX using defined value '${CXX}'"
@@ -458,7 +452,7 @@ main()
fi
if [[ ${HARDWARE_PLATFORM_ARM64} == "yes" ]]; then
- ARCHTUNE="${ARCHBASE}${ARCHSUFFIX}"
+ ARCHTUNE="-march=${ARCHBASE}${ARCHSUFFIX}"
fi
# Platform options: x64
@@ -574,7 +568,7 @@ main()
fi
fi
- if [[ ${OS} == Linux && ${CC} == clang* ]] || [[ ${OS} == OpenBSD ]]; then
+ if [[ ${OS} == Linux && ${CC} == clang* ]]; then
export LDLIBS="-l${STDLIB} ${LDLIBS}"
msg_verbose "LDLIBS has been manipulated to encode STDLIB linkage."
fi
@@ -1118,6 +1112,21 @@ display_configure_options()
done
}
+remove_configure_option()
+{
+ local PATTERN="$1"
+ local RETAINED=()
+ local OPTION
+
+ for OPTION in "${CONFIGURE_OPTIONS[@]}"; do
+ if [[ ${OPTION} != ${PATTERN} ]]; then
+ RETAINED=("${RETAINED[@]}" "${OPTION}")
+ fi
+ done
+
+ CONFIGURE_OPTIONS=("${RETAINED[@]}")
+}
+
enable_exit_on_error()
{
diff --git a/builds/cmake/install-presets.sh b/builds/cmake/install-presets.sh
index 5b21d6e73..4df8031a4 100755
--- a/builds/cmake/install-presets.sh
+++ b/builds/cmake/install-presets.sh
@@ -162,33 +162,33 @@ main()
CONFIGURE_OPTIONS_ORIGINAL=("$@")
CONFIGURE_OPTIONS=("$@")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-libsecp256k1/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-preset=*/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-src-dir=*/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-limit=*/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-full-repositories/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-post-install-clean/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-skip-tests/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-skip-test-run/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-parallel=*/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-use-local-src/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-optimized/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--noninteractive/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--verbose/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--help/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#-h/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-aes/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-sha2/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-sha3/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-avx2/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-avx512/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-avx512ifma/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-avxifma/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-shani/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-sha512/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-sse41/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-aesni/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-vaes/}")
+ remove_configure_option "--build-libsecp256k1"
+ remove_configure_option "--build-preset=*"
+ remove_configure_option "--build-src-dir=*"
+ remove_configure_option "--build-limit=*"
+ remove_configure_option "--build-full-repositories"
+ remove_configure_option "--build-post-install-clean"
+ remove_configure_option "--build-skip-tests"
+ remove_configure_option "--build-skip-test-run"
+ remove_configure_option "--build-parallel=*"
+ remove_configure_option "--build-use-local-src"
+ remove_configure_option "--hardware-optimized"
+ remove_configure_option "--noninteractive"
+ remove_configure_option "--verbose"
+ remove_configure_option "--help"
+ remove_configure_option "-h"
+ remove_configure_option "--hardware-aes"
+ remove_configure_option "--hardware-sha2"
+ remove_configure_option "--hardware-sha3"
+ remove_configure_option "--hardware-avx2"
+ remove_configure_option "--hardware-avx512"
+ remove_configure_option "--hardware-avx512ifma"
+ remove_configure_option "--hardware-avxifma"
+ remove_configure_option "--hardware-shani"
+ remove_configure_option "--hardware-sha512"
+ remove_configure_option "--hardware-sse41"
+ remove_configure_option "--hardware-aesni"
+ remove_configure_option "--hardware-vaes"
CONFIGURE_OPTIONS_CMAKE=("${CONFIGURE_OPTIONS[@]}")
msg_verbose "*** ARGUMENTS: ${CONFIGURE_OPTIONS_ORIGINAL[*]}"
msg_verbose "*** SANITIZED: ${CONFIGURE_OPTIONS[*]}"
@@ -401,7 +401,7 @@ main()
if [[ -z "${PARALLEL}" ]]; then
if [[ ${OS} == Linux ]]; then
PARALLEL=$(nproc)
- elif [[ ${OS} == Darwin ]] || [[ ${OS} == OpenBSD ]]; then
+ elif [[ ${OS} == Darwin ]] || [[ ${OS} == *BSD ]]; then
PARALLEL=$(sysctl -n hw.ncpu)
elif [[ ${OS} == MINGW* ]] || [[ ${OS} == MSYS* ]]; then
PARALLEL=${NUMBER_OF_PROCESSORS}
@@ -417,15 +417,13 @@ main()
# state rationalization of standard build variables
- if [[ ${OS} == OpenBSD ]]; then
+ if [[ ${OS} == *BSD ]]; then
make() { gmake "$@"; }
fi
if [[ -z "${STDLIB}" ]]; then
if [[ ${OS} == Darwin ]]; then
STDLIB="c++"
- elif [[ ${OS} == OpenBSD ]]; then
- STDLIB="estdc++"
else
STDLIB="stdc++"
fi
@@ -436,8 +434,6 @@ main()
if [[ -z "${CC}" ]]; then
if [[ ${OS} == Darwin ]]; then
export CC="clang"
- elif [[ ${OS} == OpenBSD ]]; then
- export CC="egcc"
fi
else
msg_verbose "CC using defined value '${CC}'"
@@ -446,8 +442,6 @@ main()
if [[ -z "${CXX}" ]]; then
if [[ ${OS} == Darwin ]]; then
export CXX="clang++"
- elif [[ ${OS} == OpenBSD ]]; then
- export CXX="eg++"
fi
else
msg_verbose "CXX using defined value '${CXX}'"
@@ -490,7 +484,7 @@ main()
fi
if [[ ${HARDWARE_PLATFORM_ARM64} == "yes" ]]; then
- ARCHTUNE="${ARCHBASE}${ARCHSUFFIX}"
+ ARCHTUNE="-march=${ARCHBASE}${ARCHSUFFIX}"
fi
# Platform options: x64
@@ -578,7 +572,7 @@ main()
fi
fi
- if [[ ${OS} == Linux && ${CC} == clang* ]] || [[ ${OS} == OpenBSD ]]; then
+ if [[ ${OS} == Linux && ${CC} == clang* ]]; then
export LDLIBS="-l${STDLIB} ${LDLIBS}"
msg_verbose "LDLIBS has been manipulated to encode STDLIB linkage."
fi
@@ -1173,6 +1167,21 @@ display_configure_options()
done
}
+remove_configure_option()
+{
+ local PATTERN="$1"
+ local RETAINED=()
+ local OPTION
+
+ for OPTION in "${CONFIGURE_OPTIONS[@]}"; do
+ if [[ ${OPTION} != ${PATTERN} ]]; then
+ RETAINED=("${RETAINED[@]}" "${OPTION}")
+ fi
+ done
+
+ CONFIGURE_OPTIONS=("${RETAINED[@]}")
+}
+
enable_exit_on_error()
{
diff --git a/builds/cmake/libbitcoin-node-config.cmake.in b/builds/cmake/libbitcoin-node-config.cmake.in
index cdf832a0b..63b9361e5 100644
--- a/builds/cmake/libbitcoin-node-config.cmake.in
+++ b/builds/cmake/libbitcoin-node-config.cmake.in
@@ -10,6 +10,10 @@ include( CMakeFindDependencyMacro )
include( "${CMAKE_CURRENT_LIST_DIR}/libbitcoin-node-targets.cmake" )
+if ( CMAKE_SYSTEM_NAME MATCHES "BSD" )
+ find_dependency( Threads )
+endif()
+
find_dependency( libbitcoin-database 4.0.0 REQUIRED )
find_dependency( libbitcoin-network 4.0.0 REQUIRED )
diff --git a/builds/gnu/configure.ac b/builds/gnu/configure.ac
index bd8931112..37b1d1fe7 100644
--- a/builds/gnu/configure.ac
+++ b/builds/gnu/configure.ac
@@ -93,6 +93,13 @@ AC_SUBST([LIBTOOL_DEPS])
# Determine C++ compiler to use.
AC_PROG_CXX
+# Link POSIX threads on BSD.
+AS_CASE([${host_os}], [*bsd*],
+ [AX_PTHREAD([], [AC_MSG_ERROR([POSIX threads are required.])])
+ LIBS="${PTHREAD_LIBS} ${LIBS}"
+ CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}"
+ CXXFLAGS="${CXXFLAGS} ${PTHREAD_CFLAGS}"])
+
# Enable sed for substitution.
AC_PROG_SED
diff --git a/builds/gnu/install-gnu.sh b/builds/gnu/install-gnu.sh
index 0059a398e..47a2d457f 100755
--- a/builds/gnu/install-gnu.sh
+++ b/builds/gnu/install-gnu.sh
@@ -174,38 +174,38 @@ main()
CONFIGURE_OPTIONS_ORIGINAL=("$@")
CONFIGURE_OPTIONS=("$@")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-libsecp256k1/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-src-dir=*/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-obj-dir=*/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-obj-dir-relative/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-limit=*/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-config=*/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-link=*/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-full-repositories/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-post-install-clean/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-skip-tests/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-skip-test-run/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-valgrind=*/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-parallel=*/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-use-local-src/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--prefix=*/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-optimized/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--noninteractive/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--verbose/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--help/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#-h/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-aes/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-sha2/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-sha3/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-avx2/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-avx512/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-avx512ifma/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-avxifma/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-shani/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-sha512/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-sse41/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-aesni/}")
- CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-vaes/}")
+ remove_configure_option "--build-libsecp256k1"
+ remove_configure_option "--build-src-dir=*"
+ remove_configure_option "--build-obj-dir=*"
+ remove_configure_option "--build-obj-dir-relative"
+ remove_configure_option "--build-limit=*"
+ remove_configure_option "--build-config=*"
+ remove_configure_option "--build-link=*"
+ remove_configure_option "--build-full-repositories"
+ remove_configure_option "--build-post-install-clean"
+ remove_configure_option "--build-skip-tests"
+ remove_configure_option "--build-skip-test-run"
+ remove_configure_option "--build-valgrind=*"
+ remove_configure_option "--build-parallel=*"
+ remove_configure_option "--build-use-local-src"
+ remove_configure_option "--prefix=*"
+ remove_configure_option "--hardware-optimized"
+ remove_configure_option "--noninteractive"
+ remove_configure_option "--verbose"
+ remove_configure_option "--help"
+ remove_configure_option "-h"
+ remove_configure_option "--hardware-aes"
+ remove_configure_option "--hardware-sha2"
+ remove_configure_option "--hardware-sha3"
+ remove_configure_option "--hardware-avx2"
+ remove_configure_option "--hardware-avx512"
+ remove_configure_option "--hardware-avx512ifma"
+ remove_configure_option "--hardware-avxifma"
+ remove_configure_option "--hardware-shani"
+ remove_configure_option "--hardware-sha512"
+ remove_configure_option "--hardware-sse41"
+ remove_configure_option "--hardware-aesni"
+ remove_configure_option "--hardware-vaes"
CONFIGURE_OPTIONS_CMAKE=()
CONFIGURE_OPTIONS_GNU=("${CONFIGURE_OPTIONS[@]}")
msg_verbose "*** ARGUMENTS: ${CONFIGURE_OPTIONS_ORIGINAL[*]}"
@@ -374,7 +374,7 @@ main()
if [[ -z "${PARALLEL}" ]]; then
if [[ ${OS} == Linux ]]; then
PARALLEL=$(nproc)
- elif [[ ${OS} == Darwin ]] || [[ ${OS} == OpenBSD ]]; then
+ elif [[ ${OS} == Darwin ]] || [[ ${OS} == *BSD ]]; then
PARALLEL=$(sysctl -n hw.ncpu)
elif [[ ${OS} == MINGW* ]] || [[ ${OS} == MSYS* ]]; then
PARALLEL=${NUMBER_OF_PROCESSORS}
@@ -390,15 +390,13 @@ main()
# state rationalization of standard build variables
- if [[ ${OS} == OpenBSD ]]; then
+ if [[ ${OS} == *BSD ]]; then
make() { gmake "$@"; }
fi
if [[ -z "${STDLIB}" ]]; then
if [[ ${OS} == Darwin ]]; then
STDLIB="c++"
- elif [[ ${OS} == OpenBSD ]]; then
- STDLIB="estdc++"
else
STDLIB="stdc++"
fi
@@ -409,8 +407,6 @@ main()
if [[ -z "${CC}" ]]; then
if [[ ${OS} == Darwin ]]; then
export CC="clang"
- elif [[ ${OS} == OpenBSD ]]; then
- export CC="egcc"
fi
else
msg_verbose "CC using defined value '${CC}'"
@@ -419,8 +415,6 @@ main()
if [[ -z "${CXX}" ]]; then
if [[ ${OS} == Darwin ]]; then
export CXX="clang++"
- elif [[ ${OS} == OpenBSD ]]; then
- export CXX="eg++"
fi
else
msg_verbose "CXX using defined value '${CXX}'"
@@ -466,7 +460,7 @@ main()
fi
if [[ ${HARDWARE_PLATFORM_ARM64} == "yes" ]]; then
- ARCHTUNE="${ARCHBASE}${ARCHSUFFIX}"
+ ARCHTUNE="-march=${ARCHBASE}${ARCHSUFFIX}"
fi
# Platform options: x64
@@ -608,7 +602,7 @@ main()
fi
fi
- if [[ ${OS} == Linux && ${CC} == clang* ]] || [[ ${OS} == OpenBSD ]]; then
+ if [[ ${OS} == Linux && ${CC} == clang* ]]; then
export LDLIBS="-l${STDLIB} ${LDLIBS}"
msg_verbose "LDLIBS has been manipulated to encode STDLIB linkage."
fi
@@ -1192,6 +1186,21 @@ display_configure_options()
done
}
+remove_configure_option()
+{
+ local PATTERN="$1"
+ local RETAINED=()
+ local OPTION
+
+ for OPTION in "${CONFIGURE_OPTIONS[@]}"; do
+ if [[ ${OPTION} != ${PATTERN} ]]; then
+ RETAINED=("${RETAINED[@]}" "${OPTION}")
+ fi
+ done
+
+ CONFIGURE_OPTIONS=("${RETAINED[@]}")
+}
+
enable_exit_on_error()
{
diff --git a/builds/msvc/build-msvc.cmd b/builds/msvc/build-msvc.cmd
index a4055d2a9..35fa50742 100644
--- a/builds/msvc/build-msvc.cmd
+++ b/builds/msvc/build-msvc.cmd
@@ -231,16 +231,15 @@ if "!libbitcoin_node_TAG!" == "" (
if %ERRORLEVEL% neq 0 (
exit /b %ERRORLEVEL%
)
- call :build_msbuild "libbitcoin-node" "builds\msvc\%proj_version%" "libbitcoin-node" "!REMAPPED_PARAMS!"
+ set "TARGETS="
+ set "TARGETS=!TARGETS!;libbitcoin-node"
+ if not "!BUILD_SKIP_TESTS!" == "yes" (
+ set "TARGETS=!TARGETS!;libbitcoin-node-test"
+ )
+ call :build_msbuild "libbitcoin-node" "builds\msvc\%proj_version%" "!TARGETS:~1!" "!REMAPPED_PARAMS!"
if %ERRORLEVEL% neq 0 (
exit /b %ERRORLEVEL%
)
- if not "!BUILD_SKIP_TESTS!" == "yes" (
- call :build_msbuild "libbitcoin-node" "builds\msvc\%proj_version%" "libbitcoin-node-test" "!REMAPPED_PARAMS!"
- if %ERRORLEVEL% neq 0 (
- exit /b %ERRORLEVEL%
- )
- )
call :pop_directory
if %ERRORLEVEL% neq 0 (
@@ -488,7 +487,7 @@ if "!libbitcoin_node_TAG!" == "" (
if not "%TARGET%" == "" (
if not "!BUILD_MODE!" == "" (
- set "TARGET_ARG=/target:%TARGET%:!BUILD_MODE!"
+ set "TARGET_ARG=/target:!TARGET:;=:%BUILD_MODE%;!:!BUILD_MODE!"
) else (
set "TARGET_ARG=/target:%TARGET%"
)
@@ -507,7 +506,12 @@ if "!libbitcoin_node_TAG!" == "" (
set "COMPILER_ARG="
if "!BUILD_COMPILER!" == "clang" (
- set "COMPILER_ARG=/p:Option-clang=true "
+ set "COMPILER_ARG=/p:PlatformToolset=ClangCL "
+ )
+
+ set "TOOLS_ARG="
+ if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
+ set "TOOLS_ARG=/p:PreferredToolArchitecture=x64 "
)
call :push_directory "!BUILD_SRC_DIR!\%PROJECT%\%RELATIVE_PATH%\!BUILD_VERSION!"
@@ -520,10 +524,10 @@ if "!libbitcoin_node_TAG!" == "" (
exit /b %ERRORLEVEL%
)
- !MSBUILD_EXE! /verbosity:!MSBUILD_VERBOSE! !SYMBOLS_ARG!!COMPILER_ARG!/p:Platform=!BUILD_PLATFORM! /p:Configuration=!BUILD_CONFIG! /p:PreferredToolArchitecture=x64 %TARGET_ARG% %PROJECT%.sln /p:PreBuildEventUseInBuild=false /p:PostBuildEventUseInBuild=false !UNHANDLED_ARGS! !ADDITIONAL_PARAMS!
+ !MSBUILD_EXE! /verbosity:!MSBUILD_VERBOSE! !SYMBOLS_ARG!!COMPILER_ARG!!TOOLS_ARG!/p:Platform=!BUILD_PLATFORM! /p:Configuration=!BUILD_CONFIG! %TARGET_ARG% %PROJECT%.sln /p:PreBuildEventUseInBuild=false /p:PostBuildEventUseInBuild=false !UNHANDLED_ARGS! !ADDITIONAL_PARAMS!
if %ERRORLEVEL% neq 0 (
- call :msg_error "!MSBUILD_EXE! /verbosity:!MSBUILD_VERBOSE! !SYMBOLS_ARG!!COMPILER_ARG!/p:Platform=!BUILD_PLATFORM! /p:Configuration=!BUILD_CONFIG! /p:PreferredToolArchitecture=x64 %TARGET_ARG% %PROJECT%.sln /p:PreBuildEventUseInBuild=false /p:PostBuildEventUseInBuild=false !UNHANDLED_ARGS! !ADDITIONAL_PARAMS!"
+ call :msg_error "!MSBUILD_EXE! /verbosity:!MSBUILD_VERBOSE! !SYMBOLS_ARG!!COMPILER_ARG!!TOOLS_ARG!/p:Platform=!BUILD_PLATFORM! /p:Configuration=!BUILD_CONFIG! %TARGET_ARG% %PROJECT%.sln /p:PreBuildEventUseInBuild=false /p:PostBuildEventUseInBuild=false !UNHANDLED_ARGS! !ADDITIONAL_PARAMS!"
call :pop_directory
exit /b 1
)
diff --git a/builds/msvc/properties/Common.props b/builds/msvc/properties/Common.props
index c9b4ff60f..f5abe044e 100644
--- a/builds/msvc/properties/Common.props
+++ b/builds/msvc/properties/Common.props
@@ -11,17 +11,9 @@
- x64
+ x64
-
-
- false
-
-
- clang-cl.exe
- $(VCInstallDir)Tools\Llvm\x64\bin
-
UNICODE;_UNICODE;%(PreprocessorDefinitions)
@@ -46,10 +38,12 @@
stdcpp17
stdcpp20
stdcpp20
+ stdcpp20
false
true
true
true
+ true
@@ -59,7 +53,7 @@
-
+
--target=i686-pc-windows-msvc %(AdditionalOptions)
--target=aarch64-pc-windows-msvc %(AdditionalOptions)
@@ -69,7 +63,7 @@
-
+
-msse4.1 -msha %(AdditionalOptions)
-mavx2 -msha512 %(AdditionalOptions)
@@ -81,7 +75,7 @@
-
+
armv8-a
armv8.2-a
@@ -90,7 +84,7 @@
%(ArmExtensions)+sha3
-
+
-march=%(ArmBase)%(ArmExtensions) %(AdditionalOptions)
diff --git a/builds/msvc/properties/Messages.props b/builds/msvc/properties/Messages.props
index 8e8d2ae4b..a66b49ff4 100644
--- a/builds/msvc/properties/Messages.props
+++ b/builds/msvc/properties/Messages.props
@@ -8,7 +8,6 @@
-