mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Outcome of discussions with Lenz and Monty about handling ccache in the build commands.
This commit is contained in:
@@ -71,6 +71,22 @@ else
|
||||
make=make
|
||||
fi
|
||||
|
||||
if test -z $CXX ; then
|
||||
if test -z "$CXX" ; then
|
||||
CXX=gcc
|
||||
fi
|
||||
|
||||
# If ccache (a compiler cache which reduces build time)
|
||||
# (http://samba.org/ccache) is installed, use it.
|
||||
# We use 'grep' and hope 'grep' will work as expected
|
||||
# (returns 0 if finds lines)
|
||||
if ccache -V > /dev/null 2>&1
|
||||
then
|
||||
if ! (echo "$CC" | grep "ccache" > /dev/null)
|
||||
then
|
||||
CC="ccache $CC"
|
||||
fi
|
||||
if ! (echo "$CXX" | grep "ccache" > /dev/null)
|
||||
then
|
||||
CXX="ccache $CXX"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -361,7 +361,7 @@ then
|
||||
# we will gets some problems when linking static programs.
|
||||
# The following code is used to fix this problem.
|
||||
|
||||
if test "$CXX" = "gcc"
|
||||
if test "$CXX" = "gcc" -o "$CXX" = "ccache gcc"
|
||||
then
|
||||
if $CXX -v 2>&1 | grep 'version 3' > /dev/null 2>&1
|
||||
then
|
||||
|
||||
Reference in New Issue
Block a user