api: Set compile_source to True when using Bazel

When building with Bazel, compile_source should be set to True because
we don't use portage's prebuilt packages for Bazel.

Also, this is needed to let recipe_modules/chrome/api.py configure goma
for Bazel builders.

BUG=b:300218625
TEST=./run_tests

Change-Id: I0844db0c04bcd4204beb1fc254f5d03d256dfbf2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/4902410
Tested-by: Ryo Hashimoto <hashimoto@chromium.org>
Commit-Queue: Ryo Hashimoto <hashimoto@chromium.org>
Reviewed-by: Tim Bain <tbain@google.com>
diff --git a/api/controller/packages.py b/api/controller/packages.py
index fea0d98..b9740c4 100644
--- a/api/controller/packages.py
+++ b/api/controller/packages.py
@@ -367,6 +367,7 @@
     compile_source = (
         input_proto.install_request.flags.compile_source
         or input_proto.install_request.flags.toolchain_changed
+        or input_proto.install_request.flags.bazel
     )
     pkgs = [
         controller_util.deserialize_package_info(pi)