Inside Bitcoin
Opening the selected file…
Inside Bitcoin
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
1#!/usr/bin/env bash2# Copyright (c) The Bitcoin Core developers3# Distributed under the MIT software license, see the accompanying4# file COPYING or https://opensource.org/license/mit.5export LC_ALL=C.UTF-86set -o errexit -o pipefail8# shellcheck source=setup.sh9source "$(dirname "${BASH_SOURCE[0]}")/setup.sh"11# Setup toolchain12llvm_toolchain14BASE_CACHE="${BASE_CACHE:-$PWD/depends/built}/GUIX/BUILD"16# Build the depends tree17make -C depends --jobs="$JOBS" HOST="$HOST" \18${V:+V=1} \19${SOURCES_PATH+SOURCES_PATH="$SOURCES_PATH"} \20${BASE_CACHE+BASE_CACHE="$BASE_CACHE"} \21${SDK_PATH+SDK_PATH="$SDK_PATH"} \22${build_CC+build_CC="$build_CC"} \23${build_CXX+build_CXX="$build_CXX"} \24${build_LDFLAGS+build_LDFLAGS="$build_LDFLAGS"} \25${build_AR+build_AR="$build_AR"} \26${build_RANLIB+build_RANLIB="$build_RANLIB"} \27${build_OBJDUMP+build_OBJDUMP="$build_OBJDUMP"} \28${build_NM+build_NM="$build_NM"} \29${build_STRIP+build_STRIP="$build_STRIP"} \30NO_QT=132mkdir -p "$DISTSRC"33(34cd "$DISTSRC"36# Extract the source tarball37tar --strip-components=1 -xf "${GIT_ARCHIVE}"39# Configure this DISTSRC for $HOST40env cmake -S . -B build \41--toolchain "${BASEPREFIX}/${HOST}/toolchain.cmake" \42-DBUILD_BENCH=OFF \43-DBUILD_FUZZ_BINARY=OFF \44-DBUILD_GUI=OFF \45-DBUILD_GUI_TESTS=OFF \46-DCMAKE_INSTALL_PREFIX="${INSTALLPATH}" \47-DCMAKE_SKIP_RPATH=TRUE \48-DREDUCE_EXPORTS=ON \49-DWITH_CCACHE=OFF51# Build Bitcoin Core52cmake --build build -j "$JOBS"54# Install built Bitcoin Core55cmake --install build --strip56)58rm -rf "$DISTSRC"/build60exit 0
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.