tools/ccache: same behaviour for local and CI builds
Some checks failed
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled

If the environment variable `CI` is set, ccache will enable the CMake
option CCACHE_DEV_MODE by default. This leads to differing behaviour
between local and CI builds which takes quite some time to debug. 🤯

Achieve consistent behaviour between local builds and CI builds by
setting CCACHE_DEV_MODE. Set it to OFF, because CCACHE_DEV_MODE amongst
other settings like linker choice, enables -Werror, which will lead to
potential compilation failures when the host compiler is updated. Using
-Werror for host utils is not desirable, because the compiler version
used is not controlled by the OpenWrt build system and host utils should
compile successfully on an as wide range of host OSes as possible.

Reported-by: Roman Azarenko <roman.azarenko@iopsys.eu>
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/20290
(cherry picked from commit 6f32c657db)
Link: https://github.com/openwrt/openwrt/pull/20335
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
Andreas Gnau 2025-10-03 10:59:42 +02:00 committed by Christian Marangi
parent 3971b15868
commit 6cd2232298
No known key found for this signature in database
GPG key ID: AC001D09ADBFEAD7

View file

@ -17,6 +17,7 @@ include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/cmake.mk
CMAKE_HOST_OPTIONS += \
-DCCACHE_DEV_MODE=OFF \
-DCMAKE_C_COMPILER_LAUNCHER="" \
-DCMAKE_CXX_COMPILER_LAUNCHER="" \
-DCMAKE_SKIP_RPATH=FALSE \