Skip to content
Open
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
3 changes: 3 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ try-import %workspace%/score.bazelrc/score_toolchain.bazelrc
# Import custom user settings
# Can be used to enable e.g. sanitizers or other features without modifying the main .bazelrc
try-import %workspace%/user.bazelrc

# Target configuration for CPU:x86-64|OS:Linux build (leveraging central configuration)
build:x86_64-linux --config=score-linux-x86_64
Comment on lines +31 to +32

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that an alias? Then no. We should not provide the same thing under multiple names.

20 changes: 20 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ single_version_override(

# Provide the tools from the devcontainer to Bazel
bazel_dep(name = "score_devcontainer", version = "1.11.0", dev_dependency = True)
bazel_dep(name = "score_cpp_policies", version = "0.1.1", dev_dependency = True)

###############################################################################
#
Expand All @@ -98,16 +99,31 @@ bazel_dep(name = "score_bazel_platforms", version = "1.1.0")
# GCC Toolchains
gcc = use_extension("@score_bazel_cpp_toolchains//extensions:gcc.bzl", "gcc")

# Compiler-warning features are owned by score_cpp_policies
_WARNING_ENABLED_FEATURES = [
Comment thread
AlexanderLanin marked this conversation as resolved.
"@score_cpp_policies//warnings/gcc/features:minimal_warnings",
"@score_cpp_policies//warnings/gcc/features:warnings_as_errors",
]

_WARNING_KNOWN_FEATURES = [
"@score_cpp_policies//warnings/gcc/features:strict_warnings",
"@score_cpp_policies//warnings/gcc/features:all_wall_warnings",
]

## Linux Toolchains
gcc.toolchain(
name = "score_gcc_x86_64_toolchain",
extra_enabled_features = _WARNING_ENABLED_FEATURES,
extra_known_features = _WARNING_KNOWN_FEATURES,
target_cpu = "x86_64",
target_os = "linux",
use_default_package = True,
version = "12.2.0",
)
gcc.toolchain(
name = "score_gcc_aarch64_toolchain",
extra_enabled_features = _WARNING_ENABLED_FEATURES,
extra_known_features = _WARNING_KNOWN_FEATURES,
target_cpu = "aarch64",
target_os = "linux",
use_default_package = True,
Expand Down Expand Up @@ -207,6 +223,8 @@ use_repo(imagefs, "score_qnx_aarch64_ifs_toolchain", "score_qnx_x86_64_ifs_toolc
qcc = use_extension("@score_bazel_cpp_toolchains//extensions:gcc.bzl", "gcc", dev_dependency = True)
qcc.toolchain(
name = "score_qcc_aarch64_toolchain",
extra_enabled_features = _WARNING_ENABLED_FEATURES,
extra_known_features = _WARNING_KNOWN_FEATURES,
sdp_version = "8.0.4",
target_cpu = "aarch64",
target_os = "qnx",
Expand All @@ -215,6 +233,8 @@ qcc.toolchain(
)
qcc.toolchain(
name = "score_qcc_x86_64_toolchain",
extra_enabled_features = _WARNING_ENABLED_FEATURES,
extra_known_features = _WARNING_KNOWN_FEATURES,
sdp_version = "8.0.4",
target_cpu = "x86_64",
target_os = "qnx",
Expand Down
Loading
Loading