ccache: set base_dir
This commit is contained in:
parent
9a2b0aca66
commit
09407ae960
3
lib/spack/env/cc
vendored
3
lib/spack/env/cc
vendored
@ -960,9 +960,6 @@ if [ -n "$SPACK_CCACHE_BINARY" ]; then
|
|||||||
case "$lang_flags" in
|
case "$lang_flags" in
|
||||||
C|CXX) # ccache only supports C languages
|
C|CXX) # ccache only supports C languages
|
||||||
prepend full_command_list "${SPACK_CCACHE_BINARY}"
|
prepend full_command_list "${SPACK_CCACHE_BINARY}"
|
||||||
# workaround for stage being a temp folder
|
|
||||||
# see #3761#issuecomment-294352232
|
|
||||||
export CCACHE_NOHASHDIR=yes
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
@ -610,9 +610,11 @@ def set_wrapper_variables(pkg, env):
|
|||||||
if spack.config.get("config:ccache"):
|
if spack.config.get("config:ccache"):
|
||||||
# Enable ccache in the compiler wrapper
|
# Enable ccache in the compiler wrapper
|
||||||
env.set(SPACK_CCACHE_BINARY, spack.util.executable.which_string("ccache", required=True))
|
env.set(SPACK_CCACHE_BINARY, spack.util.executable.which_string("ccache", required=True))
|
||||||
|
env.set("CCACHE_NOHASHDIR", "")
|
||||||
|
env.set("CCACHE_BASEDIR", os.path.realpath(spack.stage.get_stage_root()))
|
||||||
else:
|
else:
|
||||||
# Avoid cache pollution if a build system forces `ccache <compiler wrapper invocation>`.
|
# Avoid cache pollution if a build system forces `ccache <compiler wrapper invocation>`.
|
||||||
env.set("CCACHE_DISABLE", "1")
|
env.set("CCACHE_DISABLE", "")
|
||||||
|
|
||||||
# Gather information about various types of dependencies
|
# Gather information about various types of dependencies
|
||||||
rpath_hashes = set(s.dag_hash() for s in get_rpath_deps(pkg))
|
rpath_hashes = set(s.dag_hash() for s in get_rpath_deps(pkg))
|
||||||
|
Loading…
Reference in New Issue
Block a user