|
| 1 | +############################################################################# |
| 2 | +# startup |
| 3 | +############################################################################# |
| 4 | + |
| 5 | +startup --host_jvm_args=-Xmx3g |
| 6 | + |
| 7 | + |
| 8 | +############################################################################# |
| 9 | +# global |
| 10 | +############################################################################# |
| 11 | + |
| 12 | +build --color=yes |
| 13 | +fetch --color=yes |
| 14 | +run --color=yes |
| 15 | + |
| 16 | +common --enable_bzlmod |
| 17 | +common --noenable_workspace |
| 18 | +common --@envoy//bazel:enable_bzlmod=True |
| 19 | +common --registry=https://bcr.bazel.build/ |
| 20 | +common --registry=https://raw.githubusercontent.com/envoyproxy/toolshed/942638ee2c00a3b1d732c4625aa8ce5da81a1f5b/bazel-registry |
| 21 | +common --registry=https://raw.githubusercontent.com/phlax/bazel-central-registry/b739c7fa56b971d695af9600b88099236dcfef76 |
| 22 | + |
| 23 | +# build --workspace_status_command="bash get_workspace_status" |
| 24 | +build --incompatible_strict_action_env |
| 25 | +# Global C++ standard and common warning suppressions |
| 26 | +build --cxxopt=-std=c++20 --host_cxxopt=-std=c++20 |
| 27 | +build --copt=-Wno-deprecated-declarations |
| 28 | +build --define envoy_mobile_listener=enabled |
| 29 | +build --experimental_repository_downloader_retries=2 |
| 30 | +build --experimental_cc_static_library |
| 31 | +build --enable_platform_specific_config |
| 32 | +build --incompatible_merge_fixed_and_default_shell_env |
| 33 | +build --jobs=HOST_CPUS*.8 |
| 34 | +build --verbose_failures |
| 35 | + |
| 36 | +common --@rules_python//python/config_settings:bootstrap_impl=script |
| 37 | +build --incompatible_default_to_explicit_init_py |
| 38 | + |
| 39 | +# proxy-wasm-cpp-host |
| 40 | +common --@proxy-wasm-cpp-host//bazel:crypto_lib=@envoy//bazel:crypto |
| 41 | + |
| 42 | +build --@googleurl//build_config:system_icu=0 |
| 43 | + |
| 44 | +############################################################################# |
| 45 | +# ci |
| 46 | +############################################################################# |
| 47 | + |
| 48 | +common:ci --noshow_progress |
| 49 | +common:ci --noshow_loading_progress |
| 50 | +common:ci --test_output=errors |
| 51 | + |
| 52 | +build:remote-ci --config=ci |
| 53 | +build:remote-ci --remote_download_minimal |
| 54 | + |
| 55 | + |
| 56 | +############################################################################# |
| 57 | +# compiler |
| 58 | +############################################################################# |
| 59 | + |
| 60 | +# Common flags for Clang (shared between all clang variants) |
| 61 | +common:clang-common --linkopt=-fuse-ld=lld |
| 62 | +common:clang-common --@toolchains_llvm//toolchain/config:compiler-rt=false |
| 63 | +common:clang-common --@toolchains_llvm//toolchain/config:libunwind=false |
| 64 | + |
| 65 | +# Clang with libc++ (default) |
| 66 | +common:clang --config=clang-common |
| 67 | +common:clang --config=libc++ |
| 68 | +common:clang --host_platform=@clang_platform |
| 69 | +common:clang --repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 |
| 70 | + |
| 71 | +# Clang installed to non-standard location (ie not /opt/llvm/) |
| 72 | +common:clang-local --config=clang-common |
| 73 | +common:clang-local --config=libc++ |
| 74 | + |
| 75 | +# libc++ - default for clang |
| 76 | +common:libc++ --action_env=CXXFLAGS=-stdlib=libc++ |
| 77 | +common:libc++ --action_env=LDFLAGS="-stdlib=libc++ -fuse-ld=lld" |
| 78 | +common:libc++ --action_env=BAZEL_CXXOPTS=-stdlib=libc++ |
| 79 | +common:libc++ --action_env=BAZEL_LINKLIBS=-l%:libc++.a:-l%:libc++abi.a |
| 80 | +common:libc++ --action_env=BAZEL_LINKOPTS=-lm:-pthread |
| 81 | +common:libc++ --define force_libcpp=enabled |
| 82 | +common:libc++ --@envoy//bazel:libc++=true |
| 83 | + |
| 84 | + |
| 85 | +############################################################################# |
| 86 | +# remote |
| 87 | +############################################################################# |
| 88 | + |
| 89 | +build:remote --spawn_strategy=remote,sandboxed,local |
| 90 | +build:remote --strategy=Javac=remote,sandboxed,local |
| 91 | +build:remote --strategy=Closure=remote,sandboxed,local |
| 92 | +build:remote --strategy=Genrule=remote,sandboxed,local |
| 93 | +build:remote --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 |
| 94 | + |
| 95 | +## RBE (Engflow Envoy) |
| 96 | + |
| 97 | +# this is not included in the `--config=rbe` target - set it to publish to engflow ui |
| 98 | +common:bes --bes_backend=grpcs://mordenite.cluster.engflow.com/ |
| 99 | +common:bes --bes_results_url=https://mordenite.cluster.engflow.com/invocation/ |
| 100 | +common:bes --bes_timeout=3600s |
| 101 | +common:bes --bes_upload_mode=fully_async |
| 102 | +common:bes --nolegacy_important_outputs |
| 103 | + |
| 104 | +common:engflow-common --google_default_credentials=false |
| 105 | +common:engflow-common --credential_helper=*.engflow.com=%workspace%/engflow-bazel-credential-helper.sh |
| 106 | +common:engflow-common --grpc_keepalive_time=60s |
| 107 | +common:engflow-common --grpc_keepalive_timeout=30s |
| 108 | +common:engflow-common --remote_cache_compression |
| 109 | + |
| 110 | +# this provides access to RBE+cache |
| 111 | +common:rbe --config=remote-cache |
| 112 | +common:rbe --config=remote-exec |
| 113 | + |
| 114 | +# this provides access to just cache |
| 115 | +common:remote-cache --config=engflow-common |
| 116 | +common:remote-cache --remote_cache=grpcs://mordenite.cluster.engflow.com |
| 117 | +common:remote-cache --remote_timeout=3600s |
| 118 | + |
| 119 | +common:remote-exec --remote_executor=grpcs://mordenite.cluster.engflow.com |
| 120 | +common:remote-exec --jobs=200 |
| 121 | +common:remote-exec --define=engflow_rbe=true |
| 122 | + |
| 123 | +try-import %workspace%/repo.bazelrc |
0 commit comments