-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Expand file tree
/
Copy path.bazelrc
More file actions
111 lines (87 loc) · 4.73 KB
/
.bazelrc
File metadata and controls
111 lines (87 loc) · 4.73 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
# Enable logging rc options.
common --announce_rc
###############################################################################
# Global options for building OR-Tools.
###############################################################################
build --flag_alias=with_bop=//ortools/linear_solver:with_bop
build --flag_alias=with_cbc=//ortools/linear_solver:with_cbc
build --flag_alias=with_clp=//ortools/linear_solver:with_clp
build --flag_alias=with_cp_sat=//ortools/linear_solver:with_cp_sat
build --flag_alias=with_cplex=//ortools/linear_solver:with_cplex
build --flag_alias=with_glop=//ortools/linear_solver:with_glop
build --flag_alias=with_glpk=//ortools/linear_solver:with_glpk
build --flag_alias=with_highs=//ortools/linear_solver:with_highs
build --flag_alias=with_pdlp=//ortools/linear_solver:with_pdlp
build --flag_alias=with_scip=//ortools/linear_solver:with_scip
build --flag_alias=with_xpress=//ortools/linear_solver:with_xpress
# Enable absl::string_view support in @googletest
build --define absl=1
# Fix the python version
build --@rules_python//python/config_settings:python_version=3.12
###############################################################################
# Per plaform options
###############################################################################
# By default, build with various extra flags per platform.
build --enable_platform_specific_config
###############################################################################
# Options for Linux.
###############################################################################
build:linux --cxxopt=-std=c++17 --host_cxxopt=-std=c++17
build:linux --cxxopt=-Wno-sign-compare --host_cxxopt=-Wno-sign-compare
build:linux --cxxopt=-Wno-range-loop-construct --host_cxxopt=-Wno-range-loop-construct
###############################################################################
# Options for macOS.
###############################################################################
# Sets the default Apple platform to macOS.
build --apple_platform_type=macos
build:macos --features=-supports_dynamic_linker
build:macos --cxxopt=-std=c++17 --host_cxxopt=-std=c++17
build:macos --cxxopt=-Wno-sign-compare --host_cxxopt=-Wno-sign-compare
build:macos --cxxopt=-Wno-dangling-field --host_cxxopt=-Wno-dangling-field
build:macos --cxxopt=-Wno-range-loop-construct --host_cxxopt=-Wno-range-loop-construct
build:macos --cxxopt=-mmacos-version-min=10.15 --host_cxxopt=-mmacos-version-min=10.15
###############################################################################
# Options for Windows.
###############################################################################
build:windows --cxxopt=/std:c++20 --host_cxxopt=/std:c++20
# Enable the runfiles symlink tree on Windows. This makes it possible to build
# the pip package on Windows without an intermediate data-file archive, as the
# build_pip_package script in its current form (as of Aug 2023) uses the
# runfiles symlink tree to decide what to put into the Python wheel.
startup --windows_enable_symlinks
build:windows --enable_runfiles
###############################################################################
# Options for continuous integration.
###############################################################################
# All build options also apply to test as described by the "Option precedence"
# section in https://bazel.build/run/bazelrc#bazelrc-syntax-semantics.
# Note for anybody considering using --compilation_mode=opt in CI, it builds
# most files twice, one PIC version for shared libraries in tests, and one
# non-PIC version for binaries.
build:ci --copt=-O1
# Show as many errors as possible.
build:ci --keep_going
# Show test errors.
build:ci --test_output=errors
# Skip tests that are too large to run on CI.
build:ci --test_tag_filters=-noci
# Print information only about tests executed
build:ci --test_summary=short
# Attempt to work around intermittent issue while trying to fetch remote blob.
# See e.g. https://github.com/bazelbuild/bazel/issues/18694.
build:ci --remote_default_exec_properties=cache-silo-key=CleverPeafowl
###############################################################################
# Options for asan.
################################################################################
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
###############################################################################
# Put user-specific options in user.bazelrc
# See https://bazel.build/configure/best-practices#bazelrc-file
################################################################################
try-import %workspace%/user.bazelrc