Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fengzch-das
multibuild
Commits
6f4b888a
Commit
6f4b888a
authored
Oct 06, 2017
by
xoviat
Committed by
GitHub
Oct 06, 2017
Browse files
docker: cleanup and split off ccache into separate function
parent
f1d5cb6c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
19 deletions
+23
-19
docker_build_wrap.sh
docker_build_wrap.sh
+23
-19
No files found.
docker_build_wrap.sh
View file @
6f4b888a
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
# BUILD_DEPENDS (may be used by config.sh, can be empty)
# BUILD_DEPENDS (may be used by config.sh, can be empty)
set
-e
set
-e
if
[
$USE_CCACHE
==
1
]
;
then
function
activate_ccache
{
# Link up the correct location for ccache
# Link up the correct location for ccache
ln
-s
/parent-home/.ccache
$HOME
/.ccache
ln
-s
/parent-home/.ccache
$HOME
/.ccache
...
@@ -17,16 +17,20 @@ if [ $USE_CCACHE == 1 ]; then
...
@@ -17,16 +17,20 @@ if [ $USE_CCACHE == 1 ]; then
# Create fake compilers and prepend them to the PATH
# Create fake compilers and prepend them to the PATH
# Note that yum is supposed to create these for us,
# Note that yum is supposed to create these for us,
# but I had trouble finding them
# but I had trouble finding them
CCACHE_DIR
=
/usr/lib/ccache/compilers
local
ccache_dir
=
/usr/lib/ccache/compilers
mkdir
-p
$
CCACHE_DIR
mkdir
-p
$
ccache_dir
ln
-s
/usr/bin/ccache
$CCACHE_DIR
/gcc
ln
-s
/usr/bin/ccache
$CCACHE_DIR
/gcc
ln
-s
/usr/bin/ccache
$CCACHE_DIR
/g++
ln
-s
/usr/bin/ccache
$CCACHE_DIR
/g++
ln
-s
/usr/bin/ccache
$CCACHE_DIR
/cc
ln
-s
/usr/bin/ccache
$CCACHE_DIR
/cc
ln
-s
/usr/bin/ccache
$CCACHE_DIR
/c++
ln
-s
/usr/bin/ccache
$CCACHE_DIR
/c++
export
PATH
=
$CCACHE_DIR
:
$PATH
export
PATH
=
$CCACHE_DIR
:
$PATH
# Prove to the developer that
the correct gcc is us
ed
# Prove to the developer that
ccache is activat
ed
which gcc
which gcc
}
if
[
$USE_CCACHE
==
1
]
;
then
activate_ccache
fi
fi
# Unicode width, default 32
# Unicode width, default 32
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment