From 2698be0cc993aedf6cc66e20c309025c7dc5beb2 Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Sun, 25 Sep 2022 18:21:35 -0700 Subject: [PATCH] [bazel] Add some general build flags --- utils/bazel/.bazelrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/utils/bazel/.bazelrc b/utils/bazel/.bazelrc index b569177..e2967f1 100644 --- a/utils/bazel/.bazelrc +++ b/utils/bazel/.bazelrc @@ -9,6 +9,15 @@ # Prevent invalid caching if input files are modified during a build. build --experimental_guard_against_concurrent_changes +# In opt mode, bazel by default builds both PIC and non-PIC object files for +# tests vs binaries. We don't need this feature and it slows down opt builds +# considerably. +build --force_pic + +# Shared objects take up more space. With fast linkers and binaries that aren't +# super large, the benefits of shared objects are minimal. +build --dynamic_mode=off + ############################################################################### # Options to select different strategies for linking potential dependent # libraries. The default leaves it disabled. -- 2.7.4