1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-13 03:41:55 +00:00

Build: Add gcc version in cache directory

This commit is contained in:
winlin 2021-02-26 10:20:22 +08:00
parent 34dae0fe0d
commit 001a6a33ce

View file

@ -7,8 +7,13 @@ OS_PREFIX="Platform"
# Build platform cache.
SRS_PLATFORM="${OS_PREFIX}-${OS_KERNEL_NAME}-${OS_KERNRL_RELEASE}"
if [[ ${SRS_BUILD_TAG} != "" ]]; then
SRS_PLATFORM="${SRS_PLATFORM}-${SRS_BUILD_TAG}"
# Build platform cache with gcc version.
if [[ $OS_KERNEL_NAME == Darwin ]]; then
GCC_VERSION="Clang$(gcc --version 2>/dev/null|grep clang|awk '{print $4}')"
SRS_PLATFORM="${SRS_PLATFORM}-${GCC_VERSION}"
else
GCC_VERSION="GCC$(gcc --version 2>/dev/null|grep gcc|awk '{print $3}')"
SRS_PLATFORM="${SRS_PLATFORM}-${GCC_VERSION}"
fi
# Use isolate cache for different SRS version.
SRS_PLATFORM="${SRS_PLATFORM}-SRS4"