Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 56 additions & 9 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,17 +1,41 @@
# Enable logging rc options.
common --announce_rc

# Enable verbose failures for testing only.
build --verbose_failures
###############################################################################
# Global options for building Pybind11_Abseil.
###############################################################################

# Set the default Apple platform to macOS.
build --apple_platform_type=macos
# Fix the python version
build --@rules_python//python/config_settings:python_version=3.12

###############################################################################
# Per plaform options
###############################################################################

# Abseil requires C++14 at minimum.
# 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

###############################################################################
# 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-dangling-field --host_cxxopt=-Wno-dangling-field
build:macos --cxxopt=-mmacos-version-min=10.15 --host_cxxopt=-mmacos-version-min=10.15

###############################################################################
# Options for Windows.
###############################################################################

build:windows --cxxopt=/std:c++17 --host_cxxopt=/std:c++17

# Enable the runfiles symlink tree on Windows. This makes it possible to build
Expand All @@ -21,9 +45,32 @@ build:windows --cxxopt=/std:c++17 --host_cxxopt=/std:c++17
startup --windows_enable_symlinks
build:windows --enable_runfiles

# Enable logging error output.
test --test_output=errors
test --test_summary=detailed
###############################################################################
# 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.
test:ci --test_output=errors

# Skip tests that are too large to run on CI.
test:ci --test_tag_filters=-noci

# Print information only about tests executed
test:ci --test_summary=short

# https://bazel.build/configure/best-practices#bazelrc-file
###############################################################################
# Put user-specific options in user.bazelrc
# See https://bazel.build/configure/best-practices#bazelrc-file
################################################################################
try-import %workspace%/user.bazelrc
13 changes: 7 additions & 6 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,25 @@ module(
# Only direct dependencies need to be listed below.
# Please keep the versions in sync with the versions in the WORKSPACE file.
# see https://registry.bazel.build/
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "bazel_skylib", version = "1.8.2")
bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "rules_cc", version = "0.2.9")
bazel_dep(name = "rules_python", version = "1.6.3")
bazel_dep(name = "abseil-cpp", version = "20240722.1", repo_name = "com_google_absl")
bazel_dep(name = "platforms", version = "0.0.10")
bazel_dep(name = "rules_cc", version = "0.1.1")
bazel_dep(name = "rules_python", version = "0.40.0")
bazel_dep(name = "pybind11_bazel", version = "2.13.6")
bazel_dep(name = "pybind11_bazel", version = "3.0.0")

#### DEV ONLY DEPENDENCIES BELOW HERE ####

SUPPORTED_PYTHON_VERSIONS = [
"3.13",
"3.12",
"3.11",
"3.10",
"3.9",
"3.8",
]

DEFAULT_PYTHON = "3.11"
DEFAULT_PYTHON = "3.12"

python = use_extension("@rules_python//python/extensions:python.bzl", "python", dev_dependency = True)

Expand Down
Loading