blob: 507c816b1e1c66b4b152580d2e0b59471c9be9ac [file] [log] [blame]
Chris McDonald95812382022-01-11 12:36:32 -07001# Assume we're building on x86_64 Linux for now.
2build --host_platform @rules_cros//cros/platforms:linux_x86_64
3
Chris McDonald730f3f92022-02-03 14:31:06 -07004# Use the JDK provided by the CrOS SDK instead of trying to download a bundled
5# remote JDK.
6build --tool_java_runtime_version=11
7
Chris McDonald95812382022-01-11 12:36:32 -07008# Use toolchain resolution to find the cc toolchain.
9build --incompatible_enable_cc_toolchain_resolution
10
11# Enable usage of experimental cc-related build APIs
12build --experimental_starlark_cc_import
13build --experimental_repo_remote_exec
14
Chris McDonald95812382022-01-11 12:36:32 -070015# Disable local cpp toolchain detection, as we declare it explicitly.
16build --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
17
18# Declare a cc_toolchain_suite to work around
19# https://github.com/bazelbuild/bazel/issues/12712
Chris McDonald290d1b82022-01-21 15:22:54 -070020build --crosstool_top="@rules_cros//cros/toolchain/cc:cros-cc-toolchain-suite"
Chris McDonald95812382022-01-11 12:36:32 -070021
22# Lock down the PATH variable in actions to /usr/bin and /usr/local/bin.
23build --experimental_strict_action_env
24
25# Do not tokenize copts, other than strings that consist of a single Make
26# variable. This prevents the need to double-escape characters like backslashes
27# and quotes in copts.
28build --features no_copts_tokenization
29
30# Support a local user-specific bazelrc file.
31try-import %workspace%/user.bazelrc