Skip to content

Commit

Permalink
[Runner] Set environment variable CCACHE_DIR (#411)
Browse files Browse the repository at this point in the history
  • Loading branch information
giordano authored Feb 12, 2025
1 parent bc1c293 commit 1fe5d2b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Runner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1266,7 +1266,6 @@ function platform_envs(platform::AbstractPlatform, src_name::AbstractString;
"FC" => "gfortran",

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

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

# ccache options
"USE_CCACHE" => "$(use_ccache[])",
"CCACHE_DIR" => "/root/.ccache",
"CCACHE_COMPILERCHECK" => "content",

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

return platform, envs, shards
Expand Down

0 comments on commit 1fe5d2b

Please sign in to comment.