blob: 96a6ca06bc80cc9ca707d1face08d157fb80da56 [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 McDonald187e80d2022-02-03 14:52:30 -07004# Use the target platform in the bazel-out/ output directory name fragment
5# instead of the CPU (darwin, k8). This avoids thrashing the output directory
6# when switching between top level target --platforms values.
7build --experimental_platform_in_output_dir
8
Chris McDonald730f3f92022-02-03 14:31:06 -07009# Use the JDK provided by the CrOS SDK instead of trying to download a bundled
10# remote JDK.
11build --tool_java_runtime_version=11
12
Chris McDonald95812382022-01-11 12:36:32 -070013# Use toolchain resolution to find the cc toolchain.
14build --incompatible_enable_cc_toolchain_resolution
15
16# Enable usage of experimental cc-related build APIs
17build --experimental_starlark_cc_import
18build --experimental_repo_remote_exec
19
Chris McDonald95812382022-01-11 12:36:32 -070020# Disable local cpp toolchain detection, as we declare it explicitly.
21build --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
22
23# Declare a cc_toolchain_suite to work around
24# https://github.com/bazelbuild/bazel/issues/12712
Chris McDonald290d1b82022-01-21 15:22:54 -070025build --crosstool_top="@rules_cros//cros/toolchain/cc:cros-cc-toolchain-suite"
Chris McDonald95812382022-01-11 12:36:32 -070026
27# Lock down the PATH variable in actions to /usr/bin and /usr/local/bin.
28build --experimental_strict_action_env
29
30# Do not tokenize copts, other than strings that consist of a single Make
31# variable. This prevents the need to double-escape characters like backslashes
32# and quotes in copts.
33build --features no_copts_tokenization
34
35# Support a local user-specific bazelrc file.
36try-import %workspace%/user.bazelrc