Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,20 @@ if [ -d /var/cache/bazel ]; then
echo "Bazel Cache: /var/cache/bazel is not owned by ${current_owner_group}. Setting ownership (this may take a few seconds) ..."
sudo chown -R "${current_user_group}" /var/cache/bazel
fi
echo "Bazel Cache: Configuring Bazel to use /var/cache/bazel as cache..."
echo "Bazel Cache: Configuring Bazel to use /var/cache/bazel as cache (=output user root)..."
echo "startup --output_user_root=/var/cache/bazel" >> ~/.bazelrc
echo "Bazel Cache: Configuring Bazel disk cache to be in /var/cache/bazel/diskcache..."
echo "common --disk_cache=/var/cache/bazel/diskcache" >> ~/.bazelrc
else
echo "Bazel Cache: Configuring Bazel disk cache to be in /var/cache/bazel/diskcache..."
# Assuming the default location for the output user root folder is used
# Put disk cache folder within output user root folder
echo "common --disk_cache=~/.cache/bazel/_disk_cache" >> ~/.bazelrc
fi
echo "Bazel Cache: Configuring Bazel disk cache retention time (60 days)..."
echo "common --experimental_disk_cache_gc_max_age=60d" >> ~/.bazelrc
echo "Bazel Cache: Configuring Bazel disk cache max size (50 GB)..."
echo "common --experimental_disk_cache_gc_max_size=50G" >> ~/.bazelrc

# Configure clangd to remove the -fno-canonical-system-headers flag, which is
# GCC-specific. If not done, there is an annoying error message on the first
Expand Down