mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-01-28 03:37:17 +01:00
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/20334
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
28 lines
781 B
Makefile
28 lines
781 B
Makefile
#
|
|
# Copyright (C) 2006-2015 OpenWrt.org
|
|
#
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
# See /LICENSE for more information.
|
|
#
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=ccache
|
|
PKG_VERSION:=4.10.2
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
PKG_SOURCE_URL:=https://github.com/ccache/ccache/releases/download/v$(PKG_VERSION)
|
|
PKG_HASH:=108100960bb7e64573ea925af2ee7611701241abb36ce0aae3354528403a7d87
|
|
|
|
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 \
|
|
-DCMAKE_INSTALL_RPATH="${STAGING_DIR_HOST}/lib" \
|
|
-DENABLE_DOCUMENTATION=OFF \
|
|
-DREDIS_STORAGE_BACKEND=OFF
|
|
|
|
$(eval $(call HostBuild))
|