Skip to content

Commit 1fe5d2b

Browse files
authored
[Runner] Set environment variable CCACHE_DIR (#411)
1 parent bc1c293 commit 1fe5d2b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Runner.jl

+3-2
Original file line numberDiff line numberDiff line change
@@ -1266,7 +1266,6 @@ function platform_envs(platform::AbstractPlatform, src_name::AbstractString;
12661266
"FC" => "gfortran",
12671267

12681268
# We conditionally add on some compiler flags; we'll cull empty ones at the end
1269-
"USE_CCACHE" => "$(use_ccache[])",
12701269
"LLVM_TARGET" => target,
12711270
"LLVM_HOST_TARGET" => host_target,
12721271

@@ -1281,6 +1280,8 @@ function platform_envs(platform::AbstractPlatform, src_name::AbstractString;
12811280
"PKG_CONFIG_SYSROOT_DIR" => prefix,
12821281

12831282
# ccache options
1283+
"USE_CCACHE" => "$(use_ccache[])",
1284+
"CCACHE_DIR" => "/root/.ccache",
12841285
"CCACHE_COMPILERCHECK" => "content",
12851286

12861287
# Things to help us step closer to reproducible builds; eliminate timestamp
@@ -1450,7 +1451,7 @@ function runner_setup!(workspaces, mappings, workspace_root, verbose, kwargs, pl
14501451
if !isdir(ccache_dir())
14511452
mkpath(ccache_dir())
14521453
end
1453-
push!(workspaces, ccache_dir() => "/root/.ccache")
1454+
push!(workspaces, ccache_dir() => envs["CCACHE_DIR"])
14541455
end
14551456

14561457
return platform, envs, shards

0 commit comments

Comments
 (0)