forked from zml/zml
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.bazelrc
More file actions
115 lines (83 loc) · 3.67 KB
/
Copy path.bazelrc
File metadata and controls
115 lines (83 loc) · 3.67 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# Faster hash function
startup --digest_function=blake3
# Disable WORKSPACE
common --enable_workspace=false
# Don't need for now
common --lockfile_mode=update
# Needed by LLVM and/or XLA
common --experimental_repo_remote_exec
common --experimental_remote_cache_eviction_retries=5
# Self explanatory
common --enable_platform_specific_config
# Use local and ZML registries
common --registry=file://%workspace%/third_party/
common --registry=https://bazel-registry.zml.ai
common --registry=https://bcr.bazel.build
# Ensure host tools are built optimized
common --host_compilation_mode=opt
# Suppress all warnings, LLVM and friends are too noisy
common --copt='-w'
common --host_copt='-w'
# Enable C++17
common --cxxopt='-std=c++17'
common --host_cxxopt='-std=c++17'
common --enable_runfiles
# Ensure the local env doesn't leak into the build
common --incompatible_strict_action_env
# We don't to check the built files in the sandbox or repositories
common --experimental_check_output_files=false
# Performance
common --legacy_external_runfiles=false
common --experimental_output_directory_naming_scheme=diff_against_dynamic_baseline
# Mount the zig cache into the sandboxes
build:macos --sandbox_add_mount_pair=/var/tmp
build:linux --sandbox_add_mount_pair=/tmp
# Ensure workers are sandboxed
build --worker_sandboxing
# Allows symlinks with spaces
build --experimental_inprocess_symlink_creation
# Build in debug for now, by default
common --compilation_mode=dbg
# Various cc options
common --experimental_cc_static_library
common --experimental_cc_shared_library
common --incompatible_use_cc_configure_from_rules_cc
common --experimental_starlark_cc_import
common --experimental_platform_in_output_dir
# Faster sandbox speeds
build --experimental_inmemory_sandbox_stashes
# clang by default
common --compiler=clang
# Enable resolving proto compiler from toolchains
common --incompatible_enable_proto_toolchain_resolution
# Allow empty globs since some legacy rules
common --incompatible_disallow_empty_glob=false
# Use the C linker to link Zig code
common --@rules_zig//zig/settings:linkmode=cc
common --@toolchains_llvm_bootstrapped//config:experimental_stub_libgcc_s=True
common:macos --action_env=MACOSX_DEPLOYMENT_TARGET=13.0
common:macos --macos_sdk_version=13.0
# Don't detect the local C++ toolchain, be fully hermetic
# This is done only on Linux for now since we use the local toolchain on macOS
common:linux --repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
# Required for protobuf upb on Linux
common:linux --copt=-fPIC
# Print test errors in the console
test --test_output=errors
common:silent --noshow_progress
common:silent --ui_event_filters=,+error,+fail
common:silent --show_result=0
common:silent --logging=0
# --config=debug will used optmized backend, but all the frontend zig code will be compiled in debug mode.
common:debug --compilation_mode=opt
common:debug --@rules_zig//zig/settings:mode=debug
common:debug --strategy=ZigBuildLib=local
common:debug --strategy=ZigBuildObj=local
common:debug --strategy=ZigBuildTestLib=local
# --config=alldebug build everything in debug mode, including the backend.
common:alldebug --compilation_mode=dbg
common:alldebug --@rules_zig//zig/settings:mode=debug
common:alldebug --strategy=local
common:release --compilation_mode=opt
common:release --copt=-Ofast
common:release --@rules_zig//zig/settings:mode=release_safe