Commit a2ea89e5 authored by Yunlian Jiang's avatar Yunlian Jiang Committed by Commit Bot

set cache-policy only when use_lld is set.

We did not use cache-policy when using gold. This fixes a config
time error when using gold instead of lld.
The error message is
You set the variable "cache_policy" here and it was unused before
it went out of scope

Change-Id: I3dad8850899e3126549fd22fcc5bb8d60ef0d7df
Reviewed-on: https://chromium-review.googlesource.com/923398Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
Reviewed-by: default avatarScott Graham <scottmg@chromium.org>
Commit-Queue: Yunlian Jiang <yunlian@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537421}
parent c2503c05
......@@ -541,7 +541,10 @@ config("compiler") {
# 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"
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.
ldflags += [
......
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