-
Notifications
You must be signed in to change notification settings - Fork 164
Expand file tree
/
Copy path.bazelrc
More file actions
95 lines (80 loc) · 3.63 KB
/
Copy path.bazelrc
File metadata and controls
95 lines (80 loc) · 3.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
common --action_env=BAZEL_CXXOPTS=-std=c++20
common --cxxopt='-std=c++20'
common --copt=-fdiagnostics-color=always
common --test_output=errors
common --test_summary=terse
common --enable_platform_specific_config
# compilation_mode options below are `dbg` (debug symbols) `fastbuild`
# (build as quickly as possible), and `opt` (turn on all optimizations)
common -c fastbuild
common --enable_bzlmod
# prevents changes to PATH from causing a full rebuild
common --incompatible_strict_action_env
# extra flags for hermetic LLVM toolchain
common --repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
common --repo_env=BAZEL_DO_NOT_DETECT_SWIFT_TOOLCHAIN=1
common --repo_env=BAZEL_NO_APPLE_CPP_TOOLCHAIN=1
common --@rules_python//python/config_settings:bootstrap_impl=script
# Needed to silence hermetic LLVM build warnings, until this is enabled by
# default in bazel 9
startup --host_jvm_args=-DBAZEL_TRACK_SOURCE_DIRECTORIES=1
# BuildBuddy
build --bes_results_url=https://heir.buildbuddy.io/invocation/
build --bes_backend=grpcs://heir.buildbuddy.io
build --workspace_status_command=./scripts/workspace_status.sh
common --noremote_upload_local_results # Uploads logs & artifacts without writing to cache
common --remote_cache=grpcs://heir.buildbuddy.io
common --remote_cache_compression
common --remote_header=x-buildbuddy-api-key=IqGGzfrvMgDJh927qtrw
common --remote_timeout=10m
# Helps prevent disconnects when GHA-hosted runners talk to BuildBuddy
common --grpc_keepalive_time=30s
# Force downloading of TableGen-generated files (.inc) for local debugging and
# IDE autocompletion support.
build --remote_download_regex=".*\.inc$"
# This enables remote build execution and writing to the remote cache, which
# dramatically speeds up builds. Add a .bazelrc.user file with:
#
# common --remote_header=x-buildbuddy-api-key=<YOUR_API_KEY>
# common --config=remote
#
# Note this requires a buildbuddy.io account and API key. The default
# API key used above is read-only.
common:remote --extra_execution_platforms=@llvm//:rbe_platform
common:remote --jobs=500
common:remote --remote_executor=grpcs://remote.buildbuddy.io
# CI executions are always remote, and have extra build metadata
common:ci --build_metadata=ROLE=CI
common:ci --build_metadata=VISIBILITY=PUBLIC
# Only show warnings for targets defined in HEIR code.
# Warnings for external repos and generated code is (mostly) hidden; see #2616
build --output_filter="^//(benchmark|frontend|lib|tests|tools)/"
# use lld for faster linking
build:linux --linkopt="-fuse-ld=lld"
# This is needed for golang targets with the hermetic build, when a golang
# target links with a C++ lib.
build:linux --linkopt="-Wl,-no-pie"
# macos specific options
# openmp is not supported in apple clang
build:macos --@openfhe//:enable_openmp=False
build:macos --no@fuzztest//fuzztest:use_riegeli
# MacOS arm64 config
build:macos_arm64 --cpu=darwin_arm64
build:macos_arm64 --macos_minimum_os=11.0
# openmp is not supported in apple clang
build:macos_arm64 --@openfhe//:enable_openmp=False
# run with --config=asan to enable
build:asan --strip=never
build:asan --copt -fsanitize=address
build:asan --copt -DADDRESS_SANITIZER
build:asan --copt -O1
build:asan --copt -g
build:asan --copt -fno-omit-frame-pointer
build:asan --linkopt -fsanitize=address
try-import %workspace%/fuzztest.bazelrc
# Load any settings specific to the current user.
# .bazelrc.user should appear in .gitignore so that settings are not shared with team members
# This needs to be last statement in this
# config, as the user configuration should be able to overwrite flags from this file.
# See https://docs.bazel.build/versions/master/best-practices.html#bazelrc
try-import %workspace%/.bazelrc.user