2023-02-01 19:16:44 +03:00
|
|
|
# Enable configurations specific to the host platform.
|
|
|
|
common --enable_platform_specific_config
|
|
|
|
|
2023-01-09 19:28:47 +03:00
|
|
|
# Disallow empty `glob()`s.
|
|
|
|
build --incompatible_disallow_empty_glob
|
|
|
|
|
|
|
|
# Don't auto-detect the C/C++ toolchain.
|
|
|
|
build --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
|
|
|
|
|
|
|
|
# Use platforms to select toolchains.
|
|
|
|
# See https://bazel.build/concepts/platforms#cxx and
|
|
|
|
# https://github.com/bazelbuild/bazel/issues/7260.
|
|
|
|
build --incompatible_enable_cc_toolchain_resolution
|
|
|
|
|
2023-01-09 22:02:35 +03:00
|
|
|
# Disable transitions.
|
|
|
|
# See https://github.com/bazelbuild/rules_docker/issues/2052.
|
|
|
|
build --@io_bazel_rules_docker//transitions:enable=false
|
|
|
|
|
2023-01-09 20:42:51 +03:00
|
|
|
# Add aliases for compiler version build settings.
|
|
|
|
build --flag_alias=clang_version=//:clang_version
|
|
|
|
build --flag_alias=gcc_version=//:gcc_version
|
|
|
|
|
2023-02-01 19:16:44 +03:00
|
|
|
# Don't include source level debug info on macOS. See
|
|
|
|
# https://github.com/urbit/urbit/issues/5561 and
|
|
|
|
# https://github.com/urbit/vere/issues/131.
|
|
|
|
build:linux --copt='-g'
|
|
|
|
build:linux --host_copt='-g'
|
2023-01-12 21:57:44 +03:00
|
|
|
build --strip=never
|
|
|
|
|
|
|
|
# Use -O3 as the default optimization level.
|
|
|
|
build --copt='-O3'
|
2023-01-31 20:21:23 +03:00
|
|
|
build --host_copt='-O3'
|
|
|
|
|
|
|
|
# Turn on CPU and memory debug for exec config, which we only use to run the
|
|
|
|
# fake ship tests.
|
|
|
|
build --host_copt='-DU3_CPU_DEBUG'
|
|
|
|
build --host_copt='-DU3_MEMORY_DEBUG'
|
2023-02-17 22:43:32 +03:00
|
|
|
build --host_copt='-DC3DBG'
|
2023-01-09 22:02:35 +03:00
|
|
|
|
2023-02-01 19:16:44 +03:00
|
|
|
# Enable maximum debug info and disable optimizations for debug config. It's
|
|
|
|
# important that these lines come after setting the default debug and
|
|
|
|
# optimization level flags above.
|
|
|
|
build:dbg --copt='-O0'
|
|
|
|
build:dbg --copt='-g3'
|
2023-02-17 22:43:32 +03:00
|
|
|
build:dbg --copt='-DC3DBG'
|
2023-02-01 19:16:44 +03:00
|
|
|
|
2023-01-09 19:28:47 +03:00
|
|
|
# Any personal configuration should go in .user.bazelrc.
|
|
|
|
try-import %workspace%/.user.bazelrc
|