1# Platforms and toolchains for AOSP. 2# 3# Set a default target platform for builds. 4build --platforms //build/bazel/platforms:android_x86_64 5 6# # Use toolchain resolution to find the cc toolchain. 7build --incompatible_enable_cc_toolchain_resolution 8 9# Ensure that the host_javabase always use @local_jdk, the checked-in JDK. 10build --tool_java_runtime_version=local_jdk 11 12# Lock down the PATH variable in actions to /usr/bin and /usr/local/bin. 13build --experimental_strict_action_env 14 15# Explicitly allow unresolved symlinks (it's an experimental Bazel feature) 16build --experimental_allow_unresolved_symlinks 17 18# Enable usage of cc_shared_library build APIs 19build --experimental_cc_shared_library 20 21# Do not tokenize copts, other than strings that consist of a single Make 22# variable. This prevents the need to double-escape characters like backslashes 23# and quotes in copts. 24build --features no_copts_tokenization 25 26# Disable middleman actions 27build --noexperimental_enable_aggregating_middleman 28 29# Disable local cpp toolchain detection, as it is explicitly declared in AOSP. 30build --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 31 32# Disable sandboxing for CppCompile actions, as headers are not fully specified. 33# TODO(b/186116353): This is a temporary fix, as appropriately-sandboxed actions 34# are a long term goal. 35build --strategy=CppCompile=standalone 36 37# Enable building targets in //external:__subpackages__. 38common --experimental_sibling_repository_layout 39common --experimental_disable_external_package 40 41# Enable toplevel_output_directories and Ninja executor in Bazel 42common --experimental_ninja_actions 43 44# Increase refresh rate of command line UI for improved perceived responsiveness. 45common --show_progress_rate_limit=0.05 46 47# These are disabled when running under soong_ui (default = auto). Force enable them here. 48common --color=yes 49common --curses=yes 50 51# Show the full set of flags for observability and debuggability. 52common --announce_rc 53 54# Run bazel query from the workspace, without cd'ing into out/soong/queryview 55# Note that this hardcodes the output dir. It will not work if $OUT_DIR != out. 56common:queryview --package_path=%workspace%/out/soong/queryview 57 58# Run bazel query from the workspace, without cd'ing into out/soong/workspace 59# Note that this hardcodes the output dir. It will not work if $OUT_DIR != out. 60common:bp2build --package_path=%workspace%/out/soong/workspace 61 62# Support a local user-specific bazelrc file. 63try-import %workspace%/user.bazelrc 64 65build --android_sdk=//prebuilts/sdk:android_sdk 66build --experimental_enable_android_migration_apis 67build --experimental_google_legacy_api 68build --incompatible_java_common_parameters 69build --android_databinding_use_v3_4_args 70build --experimental_android_databinding_v2 71 72# Developer instance for result storage. This only works if you have access 73# to the Bazel GCP project. Follow the GCP gcloud client's auth instructions to 74# use --google_default_credentials. 75build:results --remote_instance_name=projects/bazel-untrusted/instances/default_instance 76build:results --project_id=bazel-untrusted 77build:results --remote_timeout=600 78build:results --google_default_credentials 79build:results --test_summary=detailed 80build:results --bes_backend=buildeventservice.googleapis.com 81build:results --bes_results_url=https://source.cloud.google.com/results/invocations 82build:results --show_progress_rate_limit=5 83