Skip to content

bazel: adopt module_template layout and policy-owned features - #625

Draft
fbaeuerle wants to merge 4 commits into
mainfrom
fb/519/injectable_warnings
Draft

fbaeuerle wants to merge 4 commits into
mainfrom
fb/519/injectable_warnings

Conversation

@fbaeuerle

Copy link
Copy Markdown
Contributor

Split .bazelrc into score.bazelrc/ and rename the platform configs to
score--; the bl-* names stay as aliases.

score_bazel_cpp_toolchains 1.0.0 dropped its built-in features, so bump to
1.0.3 and inject the score_cpp_policies ones. Same reason the dead names go
from COMPILER_WARNING_FEATURES. Strict warnings are now actually active,
hence the vajson number cast fix.

Closes #455
Closes #519

Split the monolithic .bazelrc into score.bazelrc/ files and rename the
platform configs to the score-<os>-<cpu> scheme. The old bl-* names are
kept as aliases.

Fixes #455
@github-actions github-actions Bot added comp-flatbuffers Related to score/flatbuffers component comp-json Related to score/json component comp-osal Related to score/os component comp-logging Related to score/mw/log component and rust frontend comp-hash Related to score/hash component comp-utils Related to score/utils comp-static_reflection_with_serialization Related to score/static_reflection_with_serialization comp-safecpp Related to score/language/safecpp c++ C++ code comp-memory Related to score/memory component comp-bitmanipulation Related to score/bitmanipulation component comp-network Related to score/network component comp-string_manipulation Related to score/string_manipulation component bazel Bazel and Starlark build files ci CI related changes labels Sep 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Documentation preview for this pull request is available at:
pr-625: https://eclipse-score.github.io/baselibs/pr-625/

@fbaeuerle
fbaeuerle force-pushed the fb/519/injectable_warnings branch from 2367648 to 6bb1468 Compare September 25, 2026 12:18
@github-actions github-actions Bot added comp-concurrency Related to score/concurrency and removed comp-logging Related to score/mw/log component and rust frontend labels Sep 25, 2026
@fbaeuerle
fbaeuerle force-pushed the fb/519/injectable_warnings branch from 6bb1468 to fc3eac0 Compare September 25, 2026 12:57
fbaeuerle and others added 3 commits September 25, 2026 19:14
The next commit activates strict_warnings, which adds -Wdouble-promotion on
Linux and -Wshadow and -Wconversion on QNX: the vajson number cast promotes a
float to double in the comparison, two tests shadow an outer local, and
procmgr_value_current passes its uint64_t return value to createFromErrno.
That value is UINT64_MAX on failure, so take the error from errno instead.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
score_bazel_cpp_toolchains 1.0.0 removed its built-in features, so bump to
1.0.3 and inject the policy-owned ones via extra_known_features. Without
that the feature names silently do nothing.

The injected flags come after a target's own copts, so the warning levels
are enabled in REPO.bazel, for this repository only. warnings_as_errors
stays in .bazelrc, which is read for the root module only and keeps
-Werror out of consumers' builds.

The policy covers GCC only, so clang-tidy and llvm_cov drop strict_warnings
and warnings_as_errors. Dropping the global -strict_warnings negation from
.bazelrc activates strict warnings for the first time; it used to override
the per-target features attribute.

Closes #519

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
treat_warnings_as_errors, additional_warnings and strict_warnings_no_error
were never defined by any toolchain and were silently ignored.
@fbaeuerle
fbaeuerle force-pushed the fb/519/injectable_warnings branch from fc3eac0 to 1d65bd4 Compare September 25, 2026 18:01

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bazel Bazel and Starlark build files c++ C++ code ci CI related changes comp-bitmanipulation Related to score/bitmanipulation component comp-concurrency Related to score/concurrency comp-flatbuffers Related to score/flatbuffers component comp-hash Related to score/hash component comp-json Related to score/json component comp-memory Related to score/memory component comp-network Related to score/network component comp-osal Related to score/os component comp-safecpp Related to score/language/safecpp comp-static_reflection_with_serialization Related to score/static_reflection_with_serialization comp-string_manipulation Related to score/string_manipulation component comp-utils Related to score/utils

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Migrate to injectable warning features in score_bazel_cpp_toolchains Validate and adopt the S-CORE global toolchain configuration

1 participant