Files
qt5/coin/provisioning/common/unix/sccache.sh
Lucie Gérard eecfb19548 Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
License files are organized under LICENSES directory.

Pick-to: 6.5 6.6
Task-number: QTBUG-67283
Task-number: QTBUG-108364
Change-Id: If26e4d35c780db4a7982bb84872b251dad24716e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-06-12 12:10:41 +00:00

36 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
# Copyright (C) 2018 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
set -ex
source "${BASH_SOURCE%/*}/../unix/DownloadURL.sh"
source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
## comment fo changin patchset..coin privision issue
function installSccache {
targetArch=$1
targetVersion=$2
sha1=$3
targetFile=sccache-$targetVersion-$targetArch.tar.gz
primaryUrl=http://ci-files01-hki.ci.qt.io/input/sccache/$targetFile
cacheUrl=https://github.com/mozilla/sccache/releases/download/$targetVersion/$targetFile
DownloadURL "$primaryUrl" "$cacheUrl" "$sha1" "$targetFile"
sudo mkdir -p /usr/local/sccache
sudo tar -C /usr/local/sccache -x -z --totals --strip-components=1 --file="$targetFile"
# add sccache __before__ the real compiler
SetEnvVar "PATH" "/usr/local/sccache:\$PATH"
# disable sccache server from shutting down after being idle
SetEnvVar "SCCACHE_IDLE_TIMEOUT" "0"
# copy sccache wrapper and place as a first in PATH
mkdir -p $HOME/sccache_wrapper
cp ${BASH_SOURCE%/*}/sccache_wrapper $HOME/sccache_wrapper/sccache
chmod 755 $HOME/sccache_wrapper/sccache
SetEnvVar "PATH" "$HOME/sccache_wrapper:\$PATH"
}