1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +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. # Build platform cache.
SRS_PLATFORM="${OS_PREFIX}-${OS_KERNEL_NAME}-${OS_KERNRL_RELEASE}" SRS_PLATFORM="${OS_PREFIX}-${OS_KERNEL_NAME}-${OS_KERNRL_RELEASE}"
if [[ ${SRS_BUILD_TAG} != "" ]]; then # Build platform cache with gcc version.
SRS_PLATFORM="${SRS_PLATFORM}-${SRS_BUILD_TAG}" 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 fi
# Use isolate cache for different SRS version. # Use isolate cache for different SRS version.
SRS_PLATFORM="${SRS_PLATFORM}-SRS4" SRS_PLATFORM="${SRS_PLATFORM}-SRS4"