David Ostrovsky | 28fe85f | 2023-11-18 22:13:31 +0100 | [diff] [blame] | 1 | # TODO(davido): Migrate all dependencies from WORKSPACE to MODULE.bazel |
| 2 | # https://issues.gerritcodereview.com/issues/303819949 |
| 3 | common --noenable_bzlmod |
| 4 | |
David Ostrovsky | 2b5fe09 | 2021-03-03 11:52:30 +0100 | [diff] [blame] | 5 | build --workspace_status_command="python3 ./tools/workspace_status.py" |
David Ostrovsky | 2bf355d | 2018-05-30 08:58:22 +0200 | [diff] [blame] | 6 | build --repository_cache=~/.gerritcodereview/bazel-cache/repository |
Wyatt Allen | 370962b | 2018-06-08 15:45:02 -0700 | [diff] [blame] | 7 | build --action_env=PATH |
Han-Wen Nienhuys | 9c15e2b | 2019-05-16 16:59:33 +0200 | [diff] [blame] | 8 | build --disk_cache=~/.gerritcodereview/bazel-cache/cas |
David Ostrovsky | 21a891c | 2020-12-19 12:57:06 +0100 | [diff] [blame] | 9 | |
David Ostrovsky | c47854e | 2023-11-25 13:27:00 +0100 | [diff] [blame] | 10 | # Define configuration using remotejdk_17, executes using remotejdk_17 or local_jdk |
| 11 | build:build_shared --java_language_version=17 |
| 12 | build:build_shared --java_runtime_version=remotejdk_17 |
| 13 | build:build_shared --tool_java_language_version=17 |
| 14 | build:build_shared --tool_java_runtime_version=remotejdk_17 |
David Ostrovsky | 21a891c | 2020-12-19 12:57:06 +0100 | [diff] [blame] | 15 | |
| 16 | # Builds using remotejdk_17, executes using remotejdk_17 or local_jdk |
David Ostrovsky | c47854e | 2023-11-25 13:27:00 +0100 | [diff] [blame] | 17 | # Avoid warnings for non default configurations: |
| 18 | # build --config=build_shared |
David Ostrovsky | 0250833 | 2022-01-08 20:12:10 +0100 | [diff] [blame] | 19 | build --java_language_version=17 |
| 20 | build --java_runtime_version=remotejdk_17 |
| 21 | build --tool_java_language_version=17 |
| 22 | build --tool_java_runtime_version=remotejdk_17 |
David Ostrovsky | 21a891c | 2020-12-19 12:57:06 +0100 | [diff] [blame] | 23 | |
Alvaro Vilaplana Garcia | 0491f5e | 2023-11-25 09:12:44 +0000 | [diff] [blame] | 24 | # Builds and executes on Google GCP RBE using remotejdk_17 |
| 25 | build:remote --config=config_gcp |
David Ostrovsky | c47854e | 2023-11-25 13:27:00 +0100 | [diff] [blame] | 26 | build:remote --config=build_shared |
| 27 | |
Alvaro Vilaplana Garcia | 0491f5e | 2023-11-25 09:12:44 +0000 | [diff] [blame] | 28 | # Define remote configuration alias |
| 29 | build:remote_gcp --config=remote |
| 30 | |
Alvaro Vilaplana Garcia | d0908c9 | 2023-11-15 15:59:25 +0000 | [diff] [blame] | 31 | # Builds and executes on BuildBuddy RBE using remotejdk_17 |
| 32 | build:remote_bb --config=config_bb |
| 33 | build:remote_bb --config=build_shared |
| 34 | |
David Ostrovsky | c47854e | 2023-11-25 13:27:00 +0100 | [diff] [blame] | 35 | # Builds using remotejdk_21, executes using remotejdk_21 or local_jdk |
| 36 | build:build_java21_shared --java_language_version=21 |
| 37 | build:build_java21_shared --java_runtime_version=remotejdk_21 |
| 38 | build:build_java21_shared --tool_java_language_version=21 |
| 39 | build:build_java21_shared --tool_java_runtime_version=remotejdk_21 |
| 40 | |
| 41 | build:java21 --config=build_java21_shared |
| 42 | |
| 43 | # Builds and executes on RBE using remotejdk_21 |
Alvaro Vilaplana Garcia | 0491f5e | 2023-11-25 09:12:44 +0000 | [diff] [blame] | 44 | build:remote21 --config=config_gcp |
David Ostrovsky | c47854e | 2023-11-25 13:27:00 +0100 | [diff] [blame] | 45 | build:remote21 --config=build_java21_shared |
Han-Wen Nienhuys | 9c15e2b | 2019-05-16 16:59:33 +0200 | [diff] [blame] | 46 | |
Alvaro Vilaplana Garcia | 0491f5e | 2023-11-25 09:12:44 +0000 | [diff] [blame] | 47 | # Define remote21 configuration alias |
| 48 | build:remote21_gcp --config=remote21 |
| 49 | |
Alvaro Vilaplana Garcia | d0908c9 | 2023-11-15 15:59:25 +0000 | [diff] [blame] | 50 | # Builds and executes on BuildBuddy RBE using remotejdk_11 |
| 51 | build:remote21_bb --config=config_bb |
| 52 | build:remote21_bb --config=build_java21_shared |
| 53 | |
David Ostrovsky | 20bb723 | 2023-09-27 15:26:53 +0200 | [diff] [blame] | 54 | # Enable modern C++ features |
| 55 | build --cxxopt=-std=c++17 |
| 56 | build --host_cxxopt=-std=c++17 |
| 57 | |
Gert van Dijk | a5c5489 | 2019-09-19 11:57:16 +0200 | [diff] [blame] | 58 | # 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. |
| 63 | build --incompatible_strict_action_env |
| 64 | |
David Ostrovsky | 2a3b282 | 2021-02-19 12:58:35 +0100 | [diff] [blame] | 65 | build --announce_rc |
| 66 | |
Thomas Draebing | 3ccc4cf | 2019-05-20 15:11:07 +0200 | [diff] [blame] | 67 | test --build_tests_only |
Nasser Grainawi | 84dbcef | 2023-02-22 15:59:32 -0700 | [diff] [blame] | 68 | test --test_output=errors |
Thomas Draebing | 3ccc4cf | 2019-05-20 15:11:07 +0200 | [diff] [blame] | 69 | |
David Ostrovsky | adb2f75 | 2019-10-10 03:47:27 +0200 | [diff] [blame] | 70 | import %workspace%/tools/remote-bazelrc |
David Ostrovsky | 96d18ce | 2023-12-19 01:14:59 +0100 | [diff] [blame] | 71 | |
| 72 | # User-specific .bazelrc |
| 73 | try-import %workspace%/user.bazelrc |