Commit 6b340a5e authored by inglorion's avatar inglorion Committed by Commit Bot

Stop using the ThinLTO cache with lld-link

lld-link can use a cache to speed up ThinLTO builds. Unfortunately,
this cache leaks temporary files on Windows, causing storage to fill
up. Until this has been addressed, this disables the cache, avoiding
the problem.

Bug: 871962
Change-Id: I415162233bc8855b3d7e237e80c23cbbc24bcfeb
Reviewed-on: https://chromium-review.googlesource.com/1185856Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Bob Haarman <inglorion@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585380}
parent 95116fa3
......@@ -626,20 +626,13 @@ config("compiler") {
cflags += [ "-flto=thin" ]
# Limit the size of the ThinLTO cache to the lesser of 10% of available disk
# space, 10GB and 100000 files.
if (use_lld) {
cache_policy =
"cache_size=10%:cache_size_bytes=10g:cache_size_files=100000"
}
if (is_win) {
# This is a straight translation of the non-Windows flags below.
# This is a straight translation of the non-Windows flags below,
# except we do not use the ThinLTO cache, which leaks temporary
# files on Windows (https://crbug.com/871962).
ldflags += [
"/opt:lldlto=0",
"/opt:lldltojobs=8",
"/lldltocache:" +
rebase_path("$root_out_dir/thinlto-cache", root_build_dir),
"/lldltocachepolicy:$cache_policy",
]
} else {
ldflags += [ "-flto=thin" ]
......@@ -648,6 +641,10 @@ config("compiler") {
# linker jobs. This is still suboptimal to a potential dynamic
# resource allocation scheme, but should be good enough.
if (use_lld) {
# Limit the size of the ThinLTO cache to the lesser of 10% of available disk
# space, 10GB and 100000 files.
cache_policy =
"cache_size=10%:cache_size_bytes=10g:cache_size_files=100000"
ldflags += [
"-Wl,--thinlto-jobs=8",
"-Wl,--thinlto-cache-dir=" +
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment