Jingwen Chen | 0b36a7c | 2021-02-03 08:29:55 -0500 | [diff] [blame] | 1 | # Platforms and toolchains for AOSP. |
| 2 | # |
| 3 | # Set a default target platform for builds. |
Jingwen Chen | 5765e4c | 2021-03-30 11:12:32 +0000 | [diff] [blame^] | 4 | build --platforms //build/bazel/platforms:android_x86_64 |
Jingwen Chen | 0b36a7c | 2021-02-03 08:29:55 -0500 | [diff] [blame] | 5 | |
| 6 | # # Use toolchain resolution to find the cc toolchain. |
| 7 | build --incompatible_enable_cc_toolchain_resolution |
| 8 | |
Jingwen Chen | 14e8903 | 2020-10-12 10:32:35 +0000 | [diff] [blame] | 9 | # Lock down the PATH variable in actions to /usr/bin and /usr/local/bin. |
| 10 | build --experimental_strict_action_env |
| 11 | |
| 12 | # Explicitly allow unresolved symlinks (it's an experimental Bazel feature) |
| 13 | build --experimental_allow_unresolved_symlinks |
| 14 | |
| 15 | # Enable usage of cc_shared_library build APIs |
| 16 | build --experimental_cc_shared_library |
| 17 | |
Chris Parsons | 55c2687 | 2020-12-14 13:18:17 -0500 | [diff] [blame] | 18 | # Disable middleman actions |
| 19 | build --noexperimental_enable_aggregating_middleman |
| 20 | |
Chris Parsons | 6c70b3c | 2021-03-01 19:34:56 -0500 | [diff] [blame] | 21 | # Disable local cpp toolchain detection, as it is explicitly declared in AOSP. |
| 22 | build --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 |
| 23 | |
Jingwen Chen | 14e8903 | 2020-10-12 10:32:35 +0000 | [diff] [blame] | 24 | # Enable building targets in //external:__subpackages__. |
| 25 | common --experimental_sibling_repository_layout |
| 26 | common --experimental_disable_external_package |
Jingwen Chen | 2c11916 | 2020-10-13 22:52:53 +0000 | [diff] [blame] | 27 | |
| 28 | # Enable toplevel_output_directories and Ninja executor in Bazel |
| 29 | common --experimental_ninja_actions |
Jingwen Chen | 730a4b6 | 2020-11-05 03:29:34 -0500 | [diff] [blame] | 30 | |
| 31 | # Increase refresh rate of command line UI for improved perceived responsiveness. |
| 32 | common --show_progress_rate_limit=0.05 |
| 33 | |
| 34 | # These are disabled when running under soong_ui (default = auto). Force enable them here. |
| 35 | common --color=yes |
| 36 | common --curses=yes |
| 37 | |
| 38 | # Show the full set of flags for observability and debuggability. |
| 39 | common --announce_rc |
| 40 | |
Jingwen Chen | 5671a1e | 2020-11-05 04:23:13 -0500 | [diff] [blame] | 41 | # Run bazel query from the workspace, without cd'ing into out/soong/queryview |
| 42 | # Note that this hardcodes the output dir. It will not work if $OUT_DIR != out. |
| 43 | common:queryview --package_path=%workspace%/out/soong/queryview |
| 44 | |
Jingwen Chen | e43ad63 | 2020-12-02 04:37:31 -0500 | [diff] [blame] | 45 | # Run bazel query from the workspace, without cd'ing into out/soong/bp2build |
| 46 | # Note that this hardcodes the output dir. It will not work if $OUT_DIR != out. |
| 47 | common:bp2build --package_path=%workspace%/out/soong/bp2build |
| 48 | |
Jingwen Chen | 730a4b6 | 2020-11-05 03:29:34 -0500 | [diff] [blame] | 49 | # Support a local user-specific bazelrc file. |
| 50 | try-import %workspace%/user.bazelrc |
Alex Humesky | a8d3f7c | 2021-03-18 01:28:38 -0400 | [diff] [blame] | 51 | |
| 52 | build --android_sdk=//prebuilts/sdk:android_sdk |
| 53 | build --experimental_enable_android_migration_apis |
| 54 | build --experimental_google_legacy_api |
| 55 | build --incompatible_java_common_parameters |
| 56 | build --android_databinding_use_v3_4_args |
| 57 | build --experimental_android_databinding_v2 |