From 027591a2543ae5431c9c58e539c8a2d89f6f8efe Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Fri, 31 Jan 2025 18:25:17 +0100 Subject: [PATCH] Pass custom CONFIG_FLAGS to guix-build --- contrib/guix/guix-build | 3 +++ contrib/guix/libexec/build.sh | 5 +---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/guix/guix-build b/contrib/guix/guix-build index 689989b280d00..7241f7e39362e 100755 --- a/contrib/guix/guix-build +++ b/contrib/guix/guix-build @@ -315,6 +315,7 @@ profiledir_for_host() { echo "${PROFILES_BASE}/${1}${2:+-${2}}" } +CONFIG_FLAGS="${CONFIG_FLAGS:--DREDUCE_EXPORTS=ON -DBUILD_BENCH=OFF -DBUILD_GUI_TESTS=OFF -DBUILD_FUZZ_BINARY=OFF}" ######### # BUILD # @@ -362,6 +363,7 @@ INFO: Building ${VERSION:?not set} for platform triple ${HOST:?not set}: ...outputting in: '$(outdir_for_host "$HOST")' ...bind-mounted in container to: '$(OUTDIR_BASE=/outdir-base && outdir_for_host "$HOST")' DEP_OPTS: ${DEP_OPTS} + CONFIG_FLAGS: ${CONFIG_FLAGS} ADDITIONAL FLAGS (if set) ADDITIONAL_GUIX_COMMON_FLAGS: ${ADDITIONAL_GUIX_COMMON_FLAGS} ADDITIONAL_GUIX_ENVIRONMENT_FLAGS: ${ADDITIONAL_GUIX_ENVIRONMENT_FLAGS} @@ -464,6 +466,7 @@ EOF OUTDIR="$(OUTDIR_BASE=/outdir-base && outdir_for_host "$HOST")" \ DIST_ARCHIVE_BASE=/outdir-base/dist-archive \ DEP_OPTS="$DEP_OPTS" \ + CONFIG_FLAGS="$CONFIG_FLAGS" \ bash -c "cd /bitcoin && bash contrib/guix/libexec/build.sh" ) diff --git a/contrib/guix/libexec/build.sh b/contrib/guix/libexec/build.sh index f71c2e766bde4..8f205ebbc49cc 100755 --- a/contrib/guix/libexec/build.sh +++ b/contrib/guix/libexec/build.sh @@ -206,9 +206,6 @@ mkdir -p "$OUTDIR" # Binary Tarball Building # ########################### -# CONFIGFLAGS -CONFIGFLAGS="-DREDUCE_EXPORTS=ON -DBUILD_BENCH=OFF -DBUILD_GUI_TESTS=OFF -DBUILD_FUZZ_BINARY=OFF" - # CFLAGS HOST_CFLAGS="-O2 -g" HOST_CFLAGS+=$(find /gnu/store -maxdepth 1 -mindepth 1 -type d -exec echo -n " -ffile-prefix-map={}=/usr" \;) @@ -243,7 +240,7 @@ mkdir -p "$DISTSRC" cmake -S . -B build \ --toolchain "${BASEPREFIX}/${HOST}/toolchain.cmake" \ -DWITH_CCACHE=OFF \ - ${CONFIGFLAGS} + ${CONFIG_FLAGS} # Build Bitcoin Core cmake --build build -j "$JOBS" ${V:+--verbose}