From e624c7500e442ed3b4595435019c46c69f57eac8 Mon Sep 17 00:00:00 2001 From: Benjamin Bannier Date: Mon, 2 Oct 2023 13:46:15 +0200 Subject: [PATCH] Enable ccache-backed Spicy JIT for users of developer scripts. For CI and more general BTest execution we already enabled ccache previously, but developers using a Spicy build out of the build directory still needed to manually set up caching. With this patch we enable it for such cases as well via `zeek-path-dev.*sh`. --- .cirrus.yml | 3 --- CMakeLists.txt | 9 +++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 8c3a07df1b..306917691b 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -170,9 +170,6 @@ env: # a solution for the mtime pruning above. ZEEK_CCACHE_EPOCH: 2 - # Cache Spicy JIT results. - HILTI_CXX_COMPILER_LAUNCHER: ccache - # Linux EOL timelines: https://linuxlifecycle.com/ # Fedora (~13 months): https://fedoraproject.org/wiki/Fedora_Release_Life_Cycle diff --git a/CMakeLists.txt b/CMakeLists.txt index c339b402af..c99fc46a07 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -535,7 +535,16 @@ file( "setenv ZEEK_SPICY_LIBRARY_PATH \"${cmake_source_dir}/scripts/spicy\"\n" "setenv SPICY_BUILD_DIRECTORY \"${cmake_binary_dir}/auxil/spicy\"\n") +if (CMAKE_CXX_COMPILER_LAUNCHER) + file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/zeek-path-dev.sh + "export HILTI_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER}\n") + + file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/zeek-path-dev.csh + "setenv HILTI_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER}\n") +endif () + file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" ZEEK_VERSION_FULL LIMIT_COUNT 1) + execute_process( COMMAND grep "^constexpr int PLUGIN_API_VERSION" INPUT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/src/plugin/Plugin.h