| # Options applied to all Bazel invocations in the workspace. |
| # This file is copied to //tools/bazel.rc from |
| # //tools/base/bazel/toplevel.bazel.rc by repo init. |
| |
| # 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 --test_output=errors |
| 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 --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 |
| build --cxxopt=-std=c++11 |
| 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_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/.android-studio-alphasource.json |
| |
| build:remote_common --config=cloud_resultstore |
| |
| # Enable the remote cache so all remote action results can be shared |
| build:remote_common --remote_cache=remotebuildexecution.googleapis.com |
| 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 --copt=-fdata-sections |
| build:release --cxxopt=-fdata-sections |
| build:release --copt=-fno-exceptions |
| build:release --cxxopt=-fno-exceptions |
| build:release --copt=-ffunction-sections |
| build:release --cxxopt=-ffunction-sections |
| 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 |
| |
| # Remote execution configuration. Enable remote_common args which include |
| # Upsalite test reporting. |
| build:remote --config=remote_common |
| build:remote --nobuild_runfile_links |
| build:remote --strategy=CppCompile=remote |
| build:remote --strategy=CppLink=remote |
| |
| build:remote --show_timestamps |
| |
| # Import several flags related to specifying the toolchain and (if applicable) |
| # java properties. |
| build:remote --host_javabase=//prebuilts/studio/jdk:jdk_runtime |
| build:remote --javabase=//prebuilts/studio/jdk:jdk_runtime |
| 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 |
| |
| # Compute MD5 digests of files with multiple threads. Testing to see if this |
| # leads to better performance with RBE. See b/77543953. |
| build:remote --experimental_multi_threaded_digest=true |
| |
| # 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' |