11# Enable logging rc options.
22common --announce_rc
33
4- # Enable verbose failures for testing only.
5- build --verbose_failures
4+ ###############################################################################
5+ # Global options for building Pybind11_Abseil.
6+ ###############################################################################
67
7- # Set the default Apple platform to macOS.
8- build --apple_platform_type=macos
8+ # Fix the python version
9+ build --@rules_python//python/config_settings:python_version=3.12
10+
11+ ###############################################################################
12+ # Per plaform options
13+ ###############################################################################
914
10- # Abseil requires C++14 at minimum .
15+ # By default, build with various extra flags per platform .
1116build --enable_platform_specific_config
17+
18+ ###############################################################################
19+ # Options for Linux.
20+ ###############################################################################
21+
1222build:linux --cxxopt=-std=c++17 --host_cxxopt=-std=c++17
23+
24+ ###############################################################################
25+ # Options for macOS.
26+ ###############################################################################
27+
28+ # Sets the default Apple platform to macOS.
29+ build --apple_platform_type=macos
30+ build:macos --features=-supports_dynamic_linker
1331build:macos --cxxopt=-std=c++17 --host_cxxopt=-std=c++17
32+ # build:macos --cxxopt=-Wno-dangling-field --host_cxxopt=-Wno-dangling-field
1433build:macos --cxxopt=-mmacos-version-min=10.15 --host_cxxopt=-mmacos-version-min=10.15
34+
35+ ###############################################################################
36+ # Options for Windows.
37+ ###############################################################################
38+
1539build:windows --cxxopt=/std:c++17 --host_cxxopt=/std:c++17
1640
1741# Enable the runfiles symlink tree on Windows. This makes it possible to build
@@ -21,9 +45,32 @@ build:windows --cxxopt=/std:c++17 --host_cxxopt=/std:c++17
2145startup --windows_enable_symlinks
2246build:windows --enable_runfiles
2347
24- # Enable logging error output.
25- test --test_output=errors
26- test --test_summary=detailed
48+ ###############################################################################
49+ # Options for continuous integration.
50+ ###############################################################################
51+
52+ # All build options also apply to test as described by the "Option precedence"
53+ # section in https://bazel.build/run/bazelrc#bazelrc-syntax-semantics.
54+
55+ # Note for anybody considering using --compilation_mode=opt in CI, it builds
56+ # most files twice, one PIC version for shared libraries in tests, and one
57+ # non-PIC version for binaries.
58+ build:ci --copt=-O1
59+
60+ # Show as many errors as possible.
61+ build:ci --keep_going
62+
63+ # Show test errors.
64+ test:ci --test_output=errors
65+
66+ # Skip tests that are too large to run on CI.
67+ test:ci --test_tag_filters=-noci
68+
69+ # Print information only about tests executed
70+ test:ci --test_summary=short
2771
28- # https://bazel.build/configure/best-practices#bazelrc-file
72+ ###############################################################################
73+ # Put user-specific options in user.bazelrc
74+ # See https://bazel.build/configure/best-practices#bazelrc-file
75+ ################################################################################
2976try-import %workspace%/user.bazelrc
0 commit comments