| # Copyright 2022 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| # AUTO-GENERATED - DO NOT EDIT! |
| |
| # Ensure that platform-based C++ toolchain selection is performed, instead |
| # of relying on --crosstool_top / --cpu / --compiler/ |
| build --incompatible_enable_cc_toolchain_resolution |
| |
| # Ensure that the same build configuration and output directory will be used |
| # when there are two different transition paths to the same configured |
| # target. For example, let's assume the following: |
| # |
| # - transition_A sets the '//:foo' boolean build flag. |
| # - transition B sets the '//:bar' boolean build flag. |
| # |
| # - the same `//:final` target is a transitive dependency of two different |
| # top-level ones using different transition paths, as in: |
| # |
| # //:toplevel1 ---transition_A---> //:intermediate1 ---transition_B---> //:final |
| # //:toplevel2 ---transition_B---> //:intermediate2 ---transition_A---> //:final |
| # |
| # Without the flag below, the //:final target will be built twice, because by default the |
| # transition path is part of the final build configuration due to a Bazel implementation |
| # detail (search for 'affected_by' in the Bazel source tree). |
| # |
| # By using 'diff_against_baseline', Bazel will ignore the transition path, and recognize |
| # that //:final only needs to be built once, at a single common location. |
| # |
| build --experimental_output_directory_naming_scheme=diff_against_baseline |
| cquery --experimental_output_directory_naming_scheme=diff_against_baseline |
| aquery --experimental_output_directory_naming_scheme=diff_against_baseline |
| |
| # Disable the injection of magic TestTrimmingTransition at analysis time |
| # which does not happen when aspects are visiting the configured graph, |
| # creating conflicts. |
| build --experimental_retain_test_configuration_across_testonly |
| cquery --experimental_retain_test_configuration_across_testonly |
| aquery --experimental_retain_test_configuration_across_testonly |
| |
| # Setup the default platform. |
| # We need to set them for cqueries and aqueries as well as build (and |
| # everything else that inherits from it). Alas, setting them in `common` |
| # breaks other things. |
| cquery --platforms=//build/bazel/platforms:{default_platform} |
| cquery --host_platform=//build/bazel/platforms:{host_platform} |
| aquery --platforms=//build/bazel/platforms:{default_platform} |
| aquery --host_platform=//build/bazel/platforms:{host_platform} |
| build --platforms=//build/bazel/platforms:{default_platform} |
| build --host_platform=//build/bazel/platforms:{host_platform} |
| |
| # Save workspace rule events to a log file for later analysis. |
| common --experimental_workspace_rules_log_file={workspace_log_file} |
| |
| # Log of actions, including remote executions with cache hit/miss status. |
| # This results in a zstd-compressed log file (proto: tools.protos.ExecLogEntry), |
| # that appears as an invocation artifact named 'execution.log'. |
| common:exec_log --experimental_execution_log_compact_file={execution_log_file} |
| # Need the following to ensure the execution.log is actually uploaded to the RBE CAS. |
| common:exec_log --remote_build_event_upload=all |
| |
| # Prevent repository downloads with custom downloader config file. |
| common --experimental_downloader_config={config_file} |
| |
| # TODO(http://b/319377689#comment5): Remove this flag when the linked issue is |
| # fixed upstream. |
| build --sandbox_add_mount_pair=/tmp |
| |
| # Disable verbose Bazel output with --config=quiet |
| # Note that --show_result=0 is not supported by `bazel query`. |
| common:quiet --noshow_loading_progress |
| common:quiet --noshow_progress |
| common:quiet --ui_event_filters=-info |
| cquery:quiet --show_result=0 |
| aquery:quiet --show_result=0 |
| build:quiet --show_result=0 |
| |
| # Ensure outputs are writable (umask 0755) instead of readonly (0555), |
| # which prevent removing output directories with `rm -rf`. |
| # See https://fxbug.dev/42072059 |
| build --experimental_writable_outputs |
| |
| # Ensure the embedded JDK that comes with Bazel is always used |
| # This prevents Bazel from downloading extra host JDKs from the |
| # network, even when a project never uses Java-related rules |
| # (for some still-very-mysterious reasons!) |
| build --java_runtime_version=embedded_jdk |
| build --tool_java_runtime_version=embedded_jdk |
| |
| # Set up DEFINE flags for libraries imported from @internal_sdk at a project |
| # level. See https://fxbug.dev/42067010 for more information. |
| build --per_file_copt=src/lib/diagnostics/accessor2logger_accessor2logger/log_message.cc@-DRAPIDJSON_HAS_STDSTRING,-DRAPIDJSON_HAS_CXX11_RANGE_FOR,-DRAPIDJSON_HAS_CXX11_RVALUE_REFS,-DRAPIDJSON_HAS_CXX11_TYPETRAITS,-DRAPIDJSON_HAS_CXX11_NOEXCEPT |
| |
| # Set up Pigweed configuration and module backends. |
| import third_party/pigweed/configuration.bazelrc |