diff --git a/.github/workflows/ci-expanded.yml b/.github/workflows/ci-expanded.yml index 48d3d8c3..4735eeb4 100644 --- a/.github/workflows/ci-expanded.yml +++ b/.github/workflows/ci-expanded.yml @@ -347,7 +347,50 @@ jobs: package: "gcc-s390x-linux-gnu g++-s390x-linux-gnu qemu-user-static" host: "s390x-linux-gnu" boost: "" - options: "--enable-isystem --build-skip-tests" + options: "--enable-isystem --build-skip-test-run" + + - image: macos-26-intel + config: "release" + link: "static" + cc: "clang" + cxx: "clang++" + flags: "" + coverage: "" + boost: "--build-boost" + options: "--enable-isystem" + + - image: ubuntu-24.04-arm + config: "release" + link: "static" + cc: "gcc-13" + cxx: "g++-13" + flags: "" + coverage: "" + boost: "--build-boost" + options: "--enable-isystem" + + - image: ubuntu-24.04 + config: "release" + link: "static" + cc: "gcc-13" + cxx: "g++-13" + flags: "-m32" + coverage: "" + package: "gcc-13-multilib g++-13-multilib" + boost: "--build-boost" + options: "--enable-isystem" + + - image: ubuntu-24.04 + config: "debug" + link: "static" + cc: "arm-linux-gnueabihf-gcc" + cxx: "arm-linux-gnueabihf-g++" + flags: "" + coverage: "" + package: "gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf" + host: "arm-linux-gnueabihf" + boost: "" + options: "--enable-isystem --build-skip-test-run" runs-on: ${{ matrix.image }} @@ -470,9 +513,11 @@ jobs: working-directory: ${{ github.workspace }} run: | echo 'int main() { return 0; }' > emulation.c - ${{ matrix.cc }} emulation.c -o emulation + ${{ matrix.cc }} ${{ matrix.flags }} emulation.c -o emulation file emulation - ./emulation + if [[ "${{ matrix.options }}" != *"--build-skip-tests"* && "${{ matrix.options }}" != *"--build-skip-test-run"* ]]; then + ./emulation + fi - name: Install boost headers [cross] if: ${{ matrix.host }} @@ -1530,24 +1575,63 @@ jobs: platform: "x64" version: "vs2026" tests: "*" + options: "" - image: windows-latest configuration: "StaticDebug" platform: "x64" version: "vs2026" tests: "*" + options: "" - image: windows-2025-vs2026 configuration: "StaticRelease" platform: "x64" version: "vs2026" tests: "*" + options: "" - image: windows-2025-vs2026 configuration: "StaticDebug" platform: "x64" version: "vs2026" tests: "*" + options: "" + + - image: windows-latest + configuration: "StaticRelease" + platform: "Win32" + version: "vs2026" + tests: "*" + options: "" + + - image: windows-latest + configuration: "StaticRelease" + platform: "x64" + version: "vs2026" + tests: "*" + options: "--build-compiler clang" + + - image: windows-11-vs2026-arm + configuration: "StaticRelease" + platform: "ARM64" + version: "vs2026" + tests: "*" + options: "" + + - image: windows-latest + configuration: "StaticRelease" + platform: "Win32" + version: "vs2026" + tests: "*" + options: "--build-compiler clang" + + - image: windows-11-vs2026-arm + configuration: "StaticRelease" + platform: "ARM64" + version: "vs2026" + tests: "*" + options: "--build-compiler clang" runs-on: ${{ matrix.image }} @@ -1565,7 +1649,7 @@ jobs: - name: Set msbuild path uses: microsoft/setup-msbuild@30375c66a4eea26614e0d39710365f22f8b0af57 # v3 with: - msbuild-architecture: x64 + msbuild-architecture: ${{ matrix.platform == 'ARM64' && 'arm64' || 'x64' }} - name: Checkout repository [libbitcoin-system] id: checkout-libbitcoin-system @@ -1646,6 +1730,7 @@ jobs: --build-platform ${{ matrix.platform }} --build-version ${{ matrix.version }} --build-use-local-src + ${{ matrix.options }} - name: Execute tests shell: powershell diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9c63fbfe..f3f9ca2e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -128,7 +128,50 @@ jobs: package: "gcc-s390x-linux-gnu g++-s390x-linux-gnu qemu-user-static" host: "s390x-linux-gnu" boost: "" - options: "--enable-isystem --build-skip-tests" + options: "--enable-isystem --build-skip-test-run" + + - image: macos-26-intel + config: "release" + link: "static" + cc: "clang" + cxx: "clang++" + flags: "" + coverage: "" + boost: "--build-boost" + options: "--enable-isystem" + + - image: ubuntu-24.04-arm + config: "release" + link: "static" + cc: "gcc-13" + cxx: "g++-13" + flags: "" + coverage: "" + boost: "--build-boost" + options: "--enable-isystem" + + - image: ubuntu-24.04 + config: "release" + link: "static" + cc: "gcc-13" + cxx: "g++-13" + flags: "-m32" + coverage: "" + package: "gcc-13-multilib g++-13-multilib" + boost: "--build-boost" + options: "--enable-isystem" + + - image: ubuntu-24.04 + config: "debug" + link: "static" + cc: "arm-linux-gnueabihf-gcc" + cxx: "arm-linux-gnueabihf-g++" + flags: "" + coverage: "" + package: "gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf" + host: "arm-linux-gnueabihf" + boost: "" + options: "--enable-isystem --build-skip-test-run" runs-on: ${{ matrix.image }} @@ -251,9 +294,11 @@ jobs: working-directory: ${{ github.workspace }} run: | echo 'int main() { return 0; }' > emulation.c - ${{ matrix.cc }} emulation.c -o emulation + ${{ matrix.cc }} ${{ matrix.flags }} emulation.c -o emulation file emulation - ./emulation + if [[ "${{ matrix.options }}" != *"--build-skip-tests"* && "${{ matrix.options }}" != *"--build-skip-test-run"* ]]; then + ./emulation + fi - name: Install boost headers [cross] if: ${{ matrix.host }} @@ -861,18 +906,49 @@ jobs: platform: "x64" version: "vs2026" tests: "*" + options: "" - image: windows-2025-vs2026 configuration: "StaticRelease" platform: "x64" version: "vs2026" tests: "*" + options: "" + + - image: windows-latest + configuration: "StaticRelease" + platform: "Win32" + version: "vs2026" + tests: "*" + options: "" + + - image: windows-latest + configuration: "StaticRelease" + platform: "x64" + version: "vs2026" + tests: "*" + options: "--build-compiler clang" + + - image: windows-11-vs2026-arm + configuration: "StaticRelease" + platform: "ARM64" + version: "vs2026" + tests: "*" + options: "" - image: windows-latest configuration: "StaticRelease" platform: "Win32" version: "vs2026" tests: "*" + options: "--build-compiler clang" + + - image: windows-11-vs2026-arm + configuration: "StaticRelease" + platform: "ARM64" + version: "vs2026" + tests: "*" + options: "--build-compiler clang" runs-on: ${{ matrix.image }} @@ -890,7 +966,7 @@ jobs: - name: Set msbuild path uses: microsoft/setup-msbuild@30375c66a4eea26614e0d39710365f22f8b0af57 # v3 with: - msbuild-architecture: x64 + msbuild-architecture: ${{ matrix.platform == 'ARM64' && 'arm64' || 'x64' }} - name: Checkout repository [libbitcoin-system] id: checkout-libbitcoin-system @@ -971,6 +1047,7 @@ jobs: --build-platform ${{ matrix.platform }} --build-version ${{ matrix.version }} --build-use-local-src + ${{ matrix.options }} - name: Execute tests shell: powershell diff --git a/builds/cmake/install-cmake.sh b/builds/cmake/install-cmake.sh index a9481de0..1e56b383 100755 --- a/builds/cmake/install-cmake.sh +++ b/builds/cmake/install-cmake.sh @@ -60,6 +60,7 @@ # Default: git clone --depth 1 --single-branch # --build-post-install-clean Clean dependencies after installation (saves space). # --build-skip-tests Skip test compilation and execution. +# --build-skip-test-run Compile tests without executing them. # --build-parallel= Number of jobs to run simultaneously. # Default: supported platforms use nproc/sysctl # --build-use-local-src Use existing sources in relevant paths. @@ -140,6 +141,7 @@ main() (--build-full-repositories) BUILD_FULL_REPOSITORIES="yes";; (--build-post-install-clean) BUILD_POST_INSTALL_CLEAN="yes";; (--build-skip-tests) BUILD_SKIP_TESTS="yes";; + (--build-skip-test-run) BUILD_SKIP_TEST_RUN="yes";; (--build-parallel=*) PARALLEL="${OPTION#*=}";; (--build-use-local-src) BUILD_USE_LOCAL_SRC="yes";; (--prefix=*) PREFIX="${OPTION#*=}";; @@ -167,6 +169,7 @@ main() 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=*/}") @@ -591,7 +594,7 @@ main() local SAVE_CPPFLAGS="${CPPFLAGS}" export CPPFLAGS="${CPPFLAGS} ${libbitcoin_node_FLAGS[@]}" build_cmake "libbitcoin-node" "builds/cmake" "." "${PARALLEL}" "${libbitcoin_node_OPTIONS[@]}" "${CONFIGURE_OPTIONS_CMAKE[@]}" - if ! [[ "${BUILD_SKIP_TESTS}" == "yes" ]]; then + if ! [[ "${BUILD_SKIP_TESTS}" == "yes" || "${BUILD_SKIP_TEST_RUN}" == "yes" ]]; then test_cmake "libbitcoin-node" "." "${PARALLEL}" fi install_cmake "libbitcoin-node" "." @@ -1021,6 +1024,7 @@ display_build_variables() msg "BUILD_POST_INSTALL_CLEAN : ${BUILD_POST_INSTALL_CLEAN}" msg "BUILD_USE_LOCAL_SRC : ${BUILD_USE_LOCAL_SRC}" msg "BUILD_SKIP_TESTS : ${BUILD_SKIP_TESTS}" + msg "BUILD_SKIP_TEST_RUN : ${BUILD_SKIP_TEST_RUN}" msg "PARALLEL : ${PARALLEL}" msg "PREFIX : ${PREFIX}" msg "DISPLAY_VERBOSE : ${DISPLAY_VERBOSE}" @@ -1128,6 +1132,7 @@ help() msg " Default: git clone --depth 1 --single-branch" msg "--build-post-install-clean Clean dependencies after installation (saves space)." msg "--build-skip-tests Skip test compilation and execution." + msg "--build-skip-test-run Compile tests without executing them." msg "--build-parallel= Number of jobs to run simultaneously." msg " Default: supported platforms use nproc/sysctl" msg "--build-use-local-src Use existing sources in relevant paths." diff --git a/builds/cmake/install-presets.sh b/builds/cmake/install-presets.sh index a5bac9d5..99d7cdb7 100755 --- a/builds/cmake/install-presets.sh +++ b/builds/cmake/install-presets.sh @@ -52,6 +52,7 @@ # Default: git clone --depth 1 --single-branch # --build-post-install-clean Clean dependencies after installation (saves space). # --build-skip-tests Skip test compilation and execution. +# --build-skip-test-run Compile tests without executing them. # --build-parallel= Number of jobs to run simultaneously. # Default: supported platforms use nproc/sysctl # --build-use-local-src Use existing sources in relevant paths. @@ -127,6 +128,7 @@ main() (--build-full-repositories) BUILD_FULL_REPOSITORIES="yes";; (--build-post-install-clean) BUILD_POST_INSTALL_CLEAN="yes";; (--build-skip-tests) BUILD_SKIP_TESTS="yes";; + (--build-skip-test-run) BUILD_SKIP_TEST_RUN="yes";; (--build-parallel=*) PARALLEL="${OPTION#*=}";; (--build-use-local-src) BUILD_USE_LOCAL_SRC="yes";; (--hardware-optimized) HARDWARE_OPTIMIZED="yes";; @@ -150,6 +152,7 @@ main() 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/}") @@ -607,7 +610,7 @@ main() local SAVE_CPPFLAGS="${CPPFLAGS}" export CPPFLAGS="${CPPFLAGS} ${libbitcoin_node_FLAGS[@]}" build_preset "libbitcoin-node" "builds/cmake" "." "${PARALLEL}" "${libbitcoin_node_OPTIONS[@]}" "${CONFIGURE_OPTIONS_CMAKE[@]}" - if ! [[ "${BUILD_SKIP_TESTS}" == "yes" ]]; then + if ! [[ "${BUILD_SKIP_TESTS}" == "yes" || "${BUILD_SKIP_TEST_RUN}" == "yes" ]]; then test_cmake "libbitcoin-node" "." "${PARALLEL}" fi install_cmake "libbitcoin-node" "." @@ -1099,6 +1102,7 @@ display_build_variables() msg "BUILD_POST_INSTALL_CLEAN : ${BUILD_POST_INSTALL_CLEAN}" msg "BUILD_USE_LOCAL_SRC : ${BUILD_USE_LOCAL_SRC}" msg "BUILD_SKIP_TESTS : ${BUILD_SKIP_TESTS}" + msg "BUILD_SKIP_TEST_RUN : ${BUILD_SKIP_TEST_RUN}" msg "PARALLEL : ${PARALLEL}" msg "PREFIX : ${PREFIX}" msg "DISPLAY_VERBOSE : ${DISPLAY_VERBOSE}" @@ -1198,6 +1202,7 @@ help() msg " Default: git clone --depth 1 --single-branch" msg "--build-post-install-clean Clean dependencies after installation (saves space)." msg "--build-skip-tests Skip test compilation and execution." + msg "--build-skip-test-run Compile tests without executing them." msg "--build-parallel= Number of jobs to run simultaneously." msg " Default: supported platforms use nproc/sysctl" msg "--build-use-local-src Use existing sources in relevant paths." diff --git a/builds/gnu/install-gnu.sh b/builds/gnu/install-gnu.sh index c56c07b7..d0c960ed 100755 --- a/builds/gnu/install-gnu.sh +++ b/builds/gnu/install-gnu.sh @@ -60,6 +60,7 @@ # Default: git clone --depth 1 --single-branch # --build-post-install-clean Clean dependencies after installation (saves space). # --build-skip-tests Skip test compilation and execution. +# --build-skip-test-run Compile tests without executing them. # --build-valgrind= Also run the tests matching the filter under valgrind. # --build-parallel= Number of jobs to run simultaneously. # Default: supported platforms use nproc/sysctl @@ -141,6 +142,7 @@ main() (--build-full-repositories) BUILD_FULL_REPOSITORIES="yes";; (--build-post-install-clean) BUILD_POST_INSTALL_CLEAN="yes";; (--build-skip-tests) BUILD_SKIP_TESTS="yes";; + (--build-skip-test-run) BUILD_SKIP_TEST_RUN="yes";; (--build-valgrind=*) BUILD_VALGRIND="${OPTION#*=}";; (--build-parallel=*) PARALLEL="${OPTION#*=}";; (--build-use-local-src) BUILD_USE_LOCAL_SRC="yes";; @@ -165,6 +167,7 @@ main() 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/}") @@ -1016,12 +1019,17 @@ test_gnu() push_directory "${RELATIVE_OBJ_PATH}" fi + local TEST_RUN=() + if [[ "${BUILD_SKIP_TEST_RUN}" == "yes" ]]; then + TEST_RUN=( "TESTS=" ) + fi + disable_exit_on_error if [[ ${JOBS} -gt ${SEQUENTIAL} ]]; then - make -j${JOBS} check VERBOSE=1 + make -j${JOBS} check VERBOSE=1 "${TEST_RUN[@]}" else - make check VERBOSE=1 + make check VERBOSE=1 "${TEST_RUN[@]}" fi local RESULT=$? @@ -1043,7 +1051,7 @@ test_gnu() exit ${RESULT} fi - if [[ -n "${BUILD_VALGRIND}" && "${PROJECT}" == "libbitcoin-node" ]]; then + if [[ -n "${BUILD_VALGRIND}" && "${BUILD_SKIP_TEST_RUN}" != "yes" && "${PROJECT}" == "libbitcoin-node" ]]; then msg "Testing ${PROJECT} under valgrind: ${BUILD_VALGRIND}" valgrind --quiet --error-exitcode=1 "./test/${PROJECT}-test" --run_test="${BUILD_VALGRIND}" @@ -1079,6 +1087,7 @@ display_build_variables() msg "BUILD_POST_INSTALL_CLEAN : ${BUILD_POST_INSTALL_CLEAN}" msg "BUILD_USE_LOCAL_SRC : ${BUILD_USE_LOCAL_SRC}" msg "BUILD_SKIP_TESTS : ${BUILD_SKIP_TESTS}" + msg "BUILD_SKIP_TEST_RUN : ${BUILD_SKIP_TEST_RUN}" msg "BUILD_VALGRIND : ${BUILD_VALGRIND}" msg "PARALLEL : ${PARALLEL}" msg "PREFIX : ${PREFIX}" @@ -1187,6 +1196,7 @@ help() msg " Default: git clone --depth 1 --single-branch" msg "--build-post-install-clean Clean dependencies after installation (saves space)." msg "--build-skip-tests Skip test compilation and execution." + msg "--build-skip-test-run Compile tests without executing them." msg "--build-valgrind= Also run the tests matching the filter under valgrind." msg "--build-parallel= Number of jobs to run simultaneously." msg " Default: supported platforms use nproc/sysctl" diff --git a/builds/msvc/build-msvc.cmd b/builds/msvc/build-msvc.cmd index 3a8f4e3a..ed9d9dfd 100644 --- a/builds/msvc/build-msvc.cmd +++ b/builds/msvc/build-msvc.cmd @@ -23,7 +23,7 @@ REM --enable-sse41 Use SSE4.1 hardware instructions. REM --enable-sha Use ARM SHA1/SHA256 Extensions. REM --enable-sha3 Use ARM SHA3 Extensions for SHA512. REM --enable-aes Use ARM AES and PMULL Extensions. -REM --enable-cuda Use cuda (gpu) batch signature verification (inert on macOS). +REM --[enable/disable]-cuda Use cuda (gpu) batch signature verification (inert on macOS). REM --build-config config Build configuration. REM --build-platform platform Build platform. REM --build-version version Build MSVC version. @@ -31,6 +31,8 @@ REM --build-mode mode Determines action on target. REM Default: Rebuild REM --build-symbols mode Determines treatment of symbols. REM Values: { default, disabled, public-only } +REM --build-compiler compiler Determines the compiler. +REM Values: { msvc, clang } REM --build-src-dir path Location for sources. REM Default: !CD! REM --build-full-repositories Sync full github repositories. @@ -162,6 +164,18 @@ if "!libbitcoin_node_TAG!" == "" ( exit /b 1 ) + if "!BUILD_COMPILER!" == "" ( + call :msg_verbose "BUILD_COMPILER not defined or empty, defaulting to 'msvc'." + ) else if "!BUILD_COMPILER!" == "msvc" ( + call :msg_verbose "BUILD_COMPILER 'msvc'." + ) else if "!BUILD_COMPILER!" == "clang" ( + call :msg_verbose "BUILD_COMPILER 'clang'." + ) else ( + call :msg_error "BUILD_COMPILER value '!BUILD_COMPILER!' unrecognized." + call :help + exit /b 1 + ) + set "REMAPPED_PARAMS=!REMAPPED_PARAMS! !libbitcoin-system_PARAMS!" set "REMAPPED_PARAMS=!REMAPPED_PARAMS! !libbitcoin-system-test_PARAMS!" set "REMAPPED_PARAMS=!REMAPPED_PARAMS! !libbitcoin-database_PARAMS!" @@ -321,6 +335,12 @@ if "!libbitcoin_node_TAG!" == "" ( ) else ( set "libbitcoin-system_PARAMS=!libbitcoin-system_PARAMS! /p:Option-cuda=true" ) + ) else if "%~1" == "--disable-cuda" ( + if "!libbitcoin-system_PARAMS!" == "" ( + set "libbitcoin-system_PARAMS=/p:Option-cuda=false" + ) else ( + set "libbitcoin-system_PARAMS=!libbitcoin-system_PARAMS! /p:Option-cuda=false" + ) ) else if "%~1" == "--build-config" ( set "BUILD_CONFIG=%~2" shift @@ -336,6 +356,9 @@ if "!libbitcoin_node_TAG!" == "" ( ) else if "%~1" == "--build-symbols" ( set "BUILD_SYMBOLS=%~2" shift + ) else if "%~1" == "--build-compiler" ( + set "BUILD_COMPILER=%~2" + shift ) else if "%~1" == "--build-src-dir" ( set "BUILD_SRC_DIR=%~2" shift @@ -494,6 +517,11 @@ if "!libbitcoin_node_TAG!" == "" ( set "SYMBOLS_ARG=/p:DebugSymbols=false " ) + set "COMPILER_ARG=" + if "!BUILD_COMPILER!" == "clang" ( + set "COMPILER_ARG=/p:Option-clang=true " + ) + call :push_directory "!BUILD_SRC_DIR!\%PROJECT%\%RELATIVE_PATH%\!BUILD_VERSION!" if %ERRORLEVEL% neq 0 ( exit /b %ERRORLEVEL% @@ -504,10 +532,10 @@ if "!libbitcoin_node_TAG!" == "" ( exit /b %ERRORLEVEL% ) - !MSBUILD_EXE! /verbosity:!MSBUILD_VERBOSE! !SYMBOLS_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!/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! if %ERRORLEVEL% neq 0 ( - call :msg_error "!MSBUILD_EXE! /verbosity:!MSBUILD_VERBOSE! !SYMBOLS_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!/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 :pop_directory exit /b 1 ) @@ -539,6 +567,7 @@ if "!libbitcoin_node_TAG!" == "" ( call :msg "BUILD_USE_LOCAL_SRC : !BUILD_USE_LOCAL_SRC!" call :msg "BUILD_MODE : !BUILD_MODE!" call :msg "BUILD_SYMBOLS : !BUILD_SYMBOLS!" + call :msg "BUILD_COMPILER : !BUILD_COMPILER!" call :msg "DISPLAY_VERBOSE : !DISPLAY_VERBOSE!" call :msg "DISPLAY_HELP : !DISPLAY_HELP!" exit /b %ERRORLEVEL% @@ -576,7 +605,7 @@ if "!libbitcoin_node_TAG!" == "" ( call :msg "--enable-sha Use ARM SHA1/SHA256 Extensions." call :msg "--enable-sha3 Use ARM SHA3 Extensions for SHA512." call :msg "--enable-aes Use ARM AES and PMULL Extensions." - call :msg "--enable-cuda Use cuda (gpu) batch signature verification (inert on macOS)." + call :msg "--[enable/disable]-cuda Use cuda (gpu) batch signature verification (inert on macOS)." call :msg "--build-config config Build configuration." call :msg "--build-platform platform Build platform." call :msg "--build-version version Build MSVC version." @@ -584,6 +613,8 @@ if "!libbitcoin_node_TAG!" == "" ( call :msg " Default: Rebuild" call :msg "--build-symbols mode Determines treatment of symbols." call :msg " Values: { default, disabled, public-only }" + call :msg "--build-compiler compiler Determines the compiler." + call :msg " Values: { msvc, clang }" call :msg "--build-src-dir path Location for sources." call :msg " Default: !CD!" call :msg "--build-full-repositories Sync full github repositories." @@ -652,9 +683,9 @@ if "!libbitcoin_node_TAG!" == "" ( :msg if "%~1" == "" ( echo. - ) else ( - echo %~1 + exit /b !ERRORLEVEL! ) + echo %~1 exit /b !ERRORLEVEL! :msg_empty @@ -662,9 +693,10 @@ if "!libbitcoin_node_TAG!" == "" ( exit /b !ERRORLEVEL! :msg_verbose - if "!DISPLAY_VERBOSE!" == "yes" ( - echo %~1 + if not "!DISPLAY_VERBOSE!" == "yes" ( + exit /b !ERRORLEVEL! ) + echo %~1 exit /b !ERRORLEVEL! :msg_success diff --git a/builds/msvc/properties/Common.props b/builds/msvc/properties/Common.props index d65d6897..cc88bc88 100644 --- a/builds/msvc/properties/Common.props +++ b/builds/msvc/properties/Common.props @@ -14,6 +14,14 @@ x64 + + + false + + + clang-cl.exe + $(VCInstallDir)Tools\Llvm\x64\bin + UNICODE;_UNICODE;%(PreprocessorDefinitions) @@ -50,4 +58,14 @@ + + + + --target=i686-pc-windows-msvc %(AdditionalOptions) + --target=aarch64-pc-windows-msvc %(AdditionalOptions) + -Wno-unused-command-line-argument %(AdditionalOptions) + TurnOffAllWarnings + + + \ No newline at end of file diff --git a/builds/msvc/properties/Messages.props b/builds/msvc/properties/Messages.props index a66b49ff..8e8d2ae4 100644 --- a/builds/msvc/properties/Messages.props +++ b/builds/msvc/properties/Messages.props @@ -8,6 +8,7 @@ + diff --git a/test/test.hpp b/test/test.hpp index 12da6e3f..cf01be54 100644 --- a/test/test.hpp +++ b/test/test.hpp @@ -81,7 +81,7 @@ namespace test { // Common directory for all test file creations. // Subdirectories and/or files must be differentiated (i.e. by TEST_NAME). -// Total path length cannot exceed MAX_PATH in HAVE_MSC builds. +// Total path length cannot exceed MAX_PATH in HAVE_WINDOWS builds. extern const std::string directory; bool clear(const std::filesystem::path& directory) NOEXCEPT;