blob: 480bea79c6c1af32520352a63260b94505f09354 [file] [log] [blame]
David Ostrovsky28fe85f2023-11-18 22:13:31 +01001# TODO(davido): Migrate all dependencies from WORKSPACE to MODULE.bazel
2# https://issues.gerritcodereview.com/issues/303819949
3common --noenable_bzlmod
4
David Ostrovsky2b5fe092021-03-03 11:52:30 +01005build --workspace_status_command="python3 ./tools/workspace_status.py"
David Ostrovsky2bf355d2018-05-30 08:58:22 +02006build --repository_cache=~/.gerritcodereview/bazel-cache/repository
Wyatt Allen370962b2018-06-08 15:45:02 -07007build --action_env=PATH
Han-Wen Nienhuys9c15e2b2019-05-16 16:59:33 +02008build --disk_cache=~/.gerritcodereview/bazel-cache/cas
David Ostrovsky21a891c2020-12-19 12:57:06 +01009
David Ostrovskyc47854e2023-11-25 13:27:00 +010010# Define configuration using remotejdk_17, executes using remotejdk_17 or local_jdk
11build:build_shared --java_language_version=17
12build:build_shared --java_runtime_version=remotejdk_17
13build:build_shared --tool_java_language_version=17
14build:build_shared --tool_java_runtime_version=remotejdk_17
David Ostrovsky21a891c2020-12-19 12:57:06 +010015
16# Builds using remotejdk_17, executes using remotejdk_17 or local_jdk
David Ostrovskyc47854e2023-11-25 13:27:00 +010017# Avoid warnings for non default configurations:
18# build --config=build_shared
David Ostrovsky02508332022-01-08 20:12:10 +010019build --java_language_version=17
20build --java_runtime_version=remotejdk_17
21build --tool_java_language_version=17
22build --tool_java_runtime_version=remotejdk_17
David Ostrovsky21a891c2020-12-19 12:57:06 +010023
Alvaro Vilaplana Garcia0491f5e2023-11-25 09:12:44 +000024# Builds and executes on Google GCP RBE using remotejdk_17
25build:remote --config=config_gcp
David Ostrovskyc47854e2023-11-25 13:27:00 +010026build:remote --config=build_shared
27
Alvaro Vilaplana Garcia0491f5e2023-11-25 09:12:44 +000028# Define remote configuration alias
29build:remote_gcp --config=remote
30
Alvaro Vilaplana Garciad0908c92023-11-15 15:59:25 +000031# Builds and executes on BuildBuddy RBE using remotejdk_17
32build:remote_bb --config=config_bb
33build:remote_bb --config=build_shared
34
David Ostrovskyc47854e2023-11-25 13:27:00 +010035# Builds using remotejdk_21, executes using remotejdk_21 or local_jdk
36build:build_java21_shared --java_language_version=21
37build:build_java21_shared --java_runtime_version=remotejdk_21
38build:build_java21_shared --tool_java_language_version=21
39build:build_java21_shared --tool_java_runtime_version=remotejdk_21
40
41build:java21 --config=build_java21_shared
42
43# Builds and executes on RBE using remotejdk_21
Alvaro Vilaplana Garcia0491f5e2023-11-25 09:12:44 +000044build:remote21 --config=config_gcp
David Ostrovskyc47854e2023-11-25 13:27:00 +010045build:remote21 --config=build_java21_shared
Han-Wen Nienhuys9c15e2b2019-05-16 16:59:33 +020046
Alvaro Vilaplana Garcia0491f5e2023-11-25 09:12:44 +000047# Define remote21 configuration alias
48build:remote21_gcp --config=remote21
49
Alvaro Vilaplana Garciad0908c92023-11-15 15:59:25 +000050# Builds and executes on BuildBuddy RBE using remotejdk_11
51build:remote21_bb --config=config_bb
52build:remote21_bb --config=build_java21_shared
53
David Ostrovsky20bb7232023-09-27 15:26:53 +020054# Enable modern C++ features
55build --cxxopt=-std=c++17
56build --host_cxxopt=-std=c++17
57
Gert van Dijka5c54892019-09-19 11:57:16 +020058# Enable strict_action_env flag to. For more information on this feature see
59# https://groups.google.com/forum/#!topic/bazel-discuss/_VmRfMyyHBk.
60# This will be the new default behavior at some point (and the flag was flipped
61# shortly in 0.21.0 - https://github.com/bazelbuild/bazel/issues/7026). Remove
62# this flag here once flipped in Bazel again.
63build --incompatible_strict_action_env
64
David Ostrovsky2a3b2822021-02-19 12:58:35 +010065build --announce_rc
66
Thomas Draebing3ccc4cf2019-05-20 15:11:07 +020067test --build_tests_only
Nasser Grainawi84dbcef2023-02-22 15:59:32 -070068test --test_output=errors
Thomas Draebing3ccc4cf2019-05-20 15:11:07 +020069
David Ostrovskyadb2f752019-10-10 03:47:27 +020070import %workspace%/tools/remote-bazelrc
David Ostrovsky96d18ce2023-12-19 01:14:59 +010071
72# User-specific .bazelrc
73try-import %workspace%/user.bazelrc