| # Options applied to all Bazel invocations in the workspace. |
| # This file is imported by the os-specific rc files. |
| # Those are included by the bazel wrapper scripts (bazel and bazel.cmd) |
| |
| # Remote Build Execution requires a strong hash function, such as SHA256. |
| startup --host_jvm_args=-Dbazel.DigestFunction=SHA256 |
| |
| # For now we require python 2 |
| build --host_force_python=PY2 |
| |
| # Enforces UTF-8 encoding in bazel tests. |
| test --test_env='LC_ALL=en_US.UTF-8' |
| test --jvmopt='-Dsun.jnu.encoding=UTF-8' |
| test --jvmopt='-Dfile.encoding=UTF-8' |
| test --jvmopt='-Xmx4G' |
| test --jvmopt='-XX:+UseConcMarkSweepGC' |
| test --verbose_failures |
| |
| # Local runs require longer timeouts. |
| test:local --test_timeout=120,600,1800,7200 |
| |
| # Don't use JUnit from Bazel. |
| test --explicit_java_test_deps |
| |
| # Tests depend on not having a real user name, but bazel now returns the |
| # real one. This flag keeps the old behavior of not having a home directory. |
| test --sandbox_fake_username |
| |
| test --sandbox_tmpfs_path=/tmp |
| |
| test:ignored --jvmopt=-Dignored.tests.only=true |
| |
| build --incompatible_strict_action_env # Ensures actions don't pick up env changes |
| build --sandbox_tmpfs_path=/tmp |
| build --javacopt="-g:source,lines,vars" # Keep debug info |
| build --javacopt=-Xep:DoNotCall:OFF # github.com/google/error-prone/issues/1131 |
| # TODO (b/141269926): this generates a warning on windows when building for host, |
| # but is required when building for android. |
| build --copt=-fvisibility=hidden |
| |
| build --define=grpc_no_ares=true |
| |
| # Forwards the system $SHELL environment variable so remote execution of bazel |
| # finds make in the ndk-build script (see b/72179674). |
| build --test_env=SHELL |
| |
| # Set flags for uploading to ResultStore |
| build:cloud_resultstore --bes_backend=buildeventservice.googleapis.com |
| build:cloud_resultstore --bes_results_url=https://source.cloud.google.com/results/invocations/ |
| build:cloud_resultstore --bes_timeout=60s |
| build:cloud_resultstore --auth_scope=https://www.googleapis.com/auth/cloud-source-tools |
| build:cloud_resultstore --project_id=908081808034 |
| build:cloud_resultstore --tls_enabled=true |
| build:cloud_resultstore --auth_enabled=true |
| build:cloud_resultstore --auth_credentials=tools/vendor/adt_infra_internal/rbe/data/studio-alphasource-credentials.json |
| build:cloud_resultstore --remote_cache=remotebuildexecution.googleapis.com |
| build:cloud_resultstore --remote_instance_name=projects/google.com:android-studio-alphasource/instances/default_instance |
| |
| # Disable writing to the remote cache by default. This allows test results to still be written, but |
| # writing to the action cache will be disabled. |
| build:cloud_resultstore --remote_upload_local_results=false |
| |
| build:remote_common --config=cloud_resultstore |
| |
| # Enable uploading to the remote cache so all remote action results can be shared |
| build:remote_common --remote_upload_local_results=true |
| build:remote_common --tls_enabled=true # Enable encryption |
| build:remote_common --experimental_strict_action_env=true |
| build:remote_common --remote_timeout=3600 |
| |
| # Enable authentication. This will pick up application default credentials by |
| # default. You can use --auth_credentials=some_file.json to use a service |
| # account credential instead. |
| build:remote_common --auth_enabled=true |
| |
| build:release -c opt |
| build:release --strip=always |
| |
| # Mimics the release config to report accurate performance numbers in tests. |
| build:remote_common --config=release |
| |
| # Use prebuilt JDK when doing local bazel build/test |
| build --host_javabase=//prebuilts/studio/jdk:jdk_runtime |
| build --javabase=//prebuilts/studio/jdk:jdk_runtime |
| build --host_java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8 |
| build --java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8 |
| |
| # cpp sandbox is very slow on mac and linux |
| build --strategy=CppCompile=standalone |
| build --strategy=CppLink=standalone |
| build --strategy=CcStrip=standalone |
| build --stripopt=--strip-unneeded |
| |
| # default android native abis |
| build --fat_apk_cpu=x86,x86_64,armeabi-v7a,armeabi,arm64-v8a |
| |
| build:remote --config=remote_common |
| build:remote --nobuild_runfile_links |
| build:remote --strategy=CppCompile=remote |
| build:remote --strategy=CppLink=remote |
| build:remote --show_timestamps |
| build:remote --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 |
| |
| # Needed for remote execution (see https://github.com/bazelbuild/bazel/issues/7254) |
| build:remote --define=EXECUTOR=remote |
| |
| # Enable remote execution so actions are performed on the remote systems. |
| build:remote --remote_executor=remotebuildexecution.googleapis.com |
| |
| # Enforce stricter environment rules, which eliminates some non-hermetic |
| # behavior and therefore improves both the remote cache hit rate and the |
| # correctness and repeatability of the build. |
| build:remote --experimental_strict_action_env=true |
| |
| # Enable jvmopt used for Foundry testing |
| test:remote --jvmopt='-Dandroid.remote.run=true' |
| |
| # Stop downloading of build outputs to the local machine and |
| # removes a possibility of network/disk bottlenecks when using RBE. |
| build:remote --remote_download_toplevel |
| |
| # Persistent workers |
| build --worker_verbose # Increases visibility in case there are issues. |
| |
| build:dynamic --config=remote |
| |
| # Enable dynamic scheduling. This will run some actions locally |
| # # as well as remotely, choosing whichever finishes first. |
| build:dynamic --internal_spawn_scheduler |
| build:dynamic --strategy=Javac=dynamic |
| build:dynamic --dynamic_local_strategy=Javac=worker,sandboxed,local |
| build:dynamic --strategy=kotlinc=dynamic |
| build:dynamic --dynamic_local_strategy=kotlinc=worker,sandboxed,local |