From 521498143af929c1f660e3a654d8d43fa6e684c8 Mon Sep 17 00:00:00 2001 From: Peter Ammon Date: Sat, 5 Oct 2024 20:15:29 -0700 Subject: [PATCH] Fix the static PCRE2 build harder Commit 4e79ec5f tried to restore the static PCRE2 build after the update to the pcre2 crate, but it set an environment variable at configure time, not build time. Properly set the environment variable at build time. --- cmake/PCRE2.cmake | 3 +-- cmake/Rust.cmake | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/PCRE2.cmake b/cmake/PCRE2.cmake index 372cadd58..5752eedea 100644 --- a/cmake/PCRE2.cmake +++ b/cmake/PCRE2.cmake @@ -3,8 +3,7 @@ set(FISH_USE_SYSTEM_PCRE2 ON CACHE BOOL if(FISH_USE_SYSTEM_PCRE2) message(STATUS "Trying to use PCRE2 from the system") - set(FISH_PCRE2_BUILDFLAG "") else() message(STATUS "Forcing static build of PCRE2") - set(ENV{PCRE2_SYS_STATIC} "1") + set(FISH_PCRE2_BUILDFLAG "PCRE2_SYS_STATIC=1") endif(FISH_USE_SYSTEM_PCRE2) diff --git a/cmake/Rust.cmake b/cmake/Rust.cmake index ba66a0078..7a7949663 100644 --- a/cmake/Rust.cmake +++ b/cmake/Rust.cmake @@ -56,5 +56,6 @@ set(VARS_FOR_CARGO "LOCALEDIR=${CMAKE_INSTALL_FULL_LOCALEDIR}" "CARGO_TARGET_DIR=${FISH_RUST_BUILD_DIR}" "CARGO_BUILD_RUSTC=${RUSTC_EXECUTABLE}" + "${FISH_PCRE2_BUILDFLAG}" "RUSTFLAGS=$ENV{RUSTFLAGS} ${rust_debugflags}" )