mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:47:47 +00:00
Ports: Enable building ports with ccache
This commit is contained in:
parent
2b0c361d04
commit
6eedb570a2
2 changed files with 9 additions and 0 deletions
|
@ -9,5 +9,6 @@ export PATH="${SERENITY_ROOT}/Toolchain/Local/${SERENITY_ARCH}/bin:${PATH}"
|
|||
export PKG_CONFIG_DIR=""
|
||||
export PKG_CONFIG_SYSROOT_DIR="${SERENITY_BUILD_DIR}/Root"
|
||||
export PKG_CONFIG_LIBDIR="${PKG_CONFIG_SYSROOT_DIR}/usr/lib/pkgconfig/:${PKG_CONFIG_SYSROOT_DIR}/usr/local/lib/pkgconfig"
|
||||
enable_ccache
|
||||
|
||||
DESTDIR="${SERENITY_BUILD_DIR}/Root"
|
||||
|
|
|
@ -21,6 +21,13 @@ maybe_source() {
|
|||
fi
|
||||
}
|
||||
|
||||
enable_ccache() {
|
||||
if command -v ccache &>/dev/null; then
|
||||
export CC="ccache ${CC}"
|
||||
export CXX="ccache ${CXX}"
|
||||
fi
|
||||
}
|
||||
|
||||
target_env() {
|
||||
maybe_source "${SCRIPT}/.hosted_defs.sh"
|
||||
}
|
||||
|
@ -36,6 +43,7 @@ host_env() {
|
|||
export PKG_CONFIG_DIR="${HOST_PKG_CONFIG_DIR}"
|
||||
export PKG_CONFIG_SYSROOT_DIR="${HOST_PKG_CONFIG_SYSROOT_DIR}"
|
||||
export PKG_CONFIG_LIBDIR="${HOST_PKG_CONFIG_LIBDIR}"
|
||||
enable_ccache
|
||||
}
|
||||
|
||||
packagesdb="${DESTDIR}/usr/Ports/packages.db"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue