Skip to content

feat(toolchain): centralize S-CORE toolchain configurations and compiler warning policies - #180

Open
srinivasugithub wants to merge 8 commits into
eclipse-score:mainfrom
bgsw-contrib:feature/S-CORE_global_toolchain_configuration
Open

srinivasugithub wants to merge 8 commits into
eclipse-score:mainfrom
bgsw-contrib:feature/S-CORE_global_toolchain_configuration

Conversation

@srinivasugithub

@srinivasugithub srinivasugithub commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Description

This PR centralizes, configures, and standardizes the Eclipse S-CORE Baselibs toolchain configurations and compiler warning policies across the workspace.

Key Changes:

  1. S-CORE Compiler Warning Policies:

    • Declared score_cpp_policies centrally as a development dependency in MODULE.bazel.
    • Defined compiler-warning features from score_cpp_policies and injected them into the standard Linux GCC and QNX QCC toolchains.
    • Downgraded redundant-decls compiler check to warning-only via --cxxopt=-Wno-error=redundant-decls in score_toolchain.bazelrc to prevent compilation failures with third-party headers (such as flatbuffers' grpc generator).
  2. QNX SDP and IFS Toolchain Support:

    • Standardized on QNX SDP version 8.0.4 for QNX toolchains in MODULE.bazel.
    • Centralized the QNX IFS (Image File System) toolchains (score_qnx_x86_64_ifs_toolchain and score_qnx_aarch64_ifs_toolchain) under the QNX Toolchains block to resolve downstream dependency issues.
  3. Multi-Architecture and CPU Configurations:

    • Added standard GCC Linux aarch64-linux toolchain declarations and target configuration profiles.
    • Added score_qcc_aarch64_toolchain_pkg to QNX use_repo block to provide ARM64 sysroot support centrally.
    • Added standard x86_64-linux target configuration alias mapping to score-linux-x86_64 in .bazelrc.
    • Fixed copy-paste target configuration typos in score_toolchain.bazelrc under QNX configurations.
  4. Lockfile & Bzlmod Resolution:

    • Fully synchronized MODULE.bazel.lock transitive dependency map with all metadata upgrades (including updates for aspect_rules_lint, rules_cc, rules_nodejs, etc.).

srinivasugithub and others added 7 commits August 26, 2026 14:59
- Fix copy-paste typo in score_toolchain.bazelrc where score-autosd-aarch64 was mistakenly used under the x86_64 target configuration.
- Add score_qcc_aarch64_toolchain_pkg to QNX use_repo block to provide the ARM64 QNX target sysroot package centrally.
- Add standard GCC Linux aarch64-linux toolchain declaration and standard score-linux-aarch64 configuration profile.
- Declare 'score_rules_imagefs' centrally in MODULE.bazel under QNX Toolchains block.
- Define 'score_qnx_x86_64_ifs_toolchain' and 'score_qnx_aarch64_ifs_toolchain' centrally to prevent downstream dependency resolution issues when leveraging 'score_toolchain.bazelrc'.
- Format workspace BUILD files using Buildifier.
- Update MODULE.bazel.lock transitive dependency map.
- Update sdp_version to "8.0.4" for QNX toolchains in MODULE.bazel.
- Update MODULE.bazel.lock transitive dependency map.
… support

- Declare score_cpp_policies as dev dependency in MODULE.bazel.
- Define compiler-warning features from score_cpp_policies and inject them into standard Linux GCC and QNX QCC toolchains.
- Add target configuration alias for CPU:x86-64|OS:Linux to .bazelrc, referencing score-linux-x86_64 centrally.

Signed-off-by: Srinivasu K <srinivasu.kandukuri@in.bosch.com>
…zelrc

Add --cxxopt=-Wno-error=redundant-decls to our common compiler flags. This prevents third-party headers/compilers (such as flatbuffers' grpc generator) from breaking our builds with unused redundant declarations under the new score_cpp_policies warnings.

Signed-off-by: Srinivasu K <srinivasu.kandukuri@in.bosch.com>
…tadata

Update lockfile with resolved dependency and toolchain registry changes, including aspect_rules_lint, rules_cc, and rules_nodejs.

Signed-off-by: Srinivasu K <srinivasu.kandukuri@in.bosch.com>
@github-actions

github-actions Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run --lockfile_mode=error //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.7.0) and connecting to it...
INFO: Invocation ID: 0faf8a87-00a6-4344-ac6c-446c0ee00da7
Computing main repo mapping: 
Computing main repo mapping: 
WARNING: For repository 'aspect_rules_lint', the root module requires module version aspect_rules_lint@2.3.0, but got aspect_rules_lint@2.5.0 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)

Analyzing: target //:license-check (34 packages loaded, 10 targets configured)

Analyzing: target //:license-check (85 packages loaded, 10 targets configured)

Analyzing: target //:license-check (127 packages loaded, 331 targets configured)

Analyzing: target //:license-check (156 packages loaded, 3134 targets configured)

Analyzing: target //:license-check (157 packages loaded, 8231 targets configured)

Analyzing: target //:license-check (165 packages loaded, 8274 targets configured)

Analyzing: target //:license-check (165 packages loaded, 8274 targets configured)

Analyzing: target //:license-check (169 packages loaded, 10283 targets configured)

Analyzing: target //:license-check (170 packages loaded, 10403 targets configured)

Analyzing: target //:license-check (170 packages loaded, 10403 targets configured)

INFO: Analyzed target //:license-check (171 packages loaded, 11982 targets configured).
[10 / 16] Creating runfiles tree bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/score_tooling+/dash/tool/formatters/dash_format_converter.runfiles [for tool]; 0s local ... (2 actions, 1 running)
INFO: From Generating Dash formatted dependency file ...:
INFO: Successfully converted 2 packages from Cargo.lock to bazel-out/k8-fastbuild/bin/formatted.txt
[13 / 16] JavaToolchainCompileClasses external/rules_java+/toolchains/platformclasspath_classes; 0s disk-cache, processwrapper-sandbox
[15 / 16] Building license.check.license_check.jar (); 0s disk-cache, multiplex-worker
INFO: Found 1 target...
Target //:license.check.license_check up-to-date:
  bazel-bin/license.check.license_check
  bazel-bin/license.check.license_check.jar
INFO: Elapsed time: 215.998s, Critical Path: 2.63s
INFO: 16 processes: 12 internal, 3 processwrapper-sandbox, 1 worker.
INFO: Build completed successfully, 16 total actions
INFO: Running command line: bazel-bin/license.check.license_check ./formatted.txt <args omitted>
usage: org.eclipse.dash.licenses.cli.Main [-batch <int>] [-cd <url>]
       [-confidence <int>] [-ef <url>] [-excludeSources <sources>] [-help] [-lic
       <url>] [-project <shortname>] [-repo <url>] [-review] [-summary <file>]
       [-timeout <seconds>] [-token <token>]

@srinivasugithub srinivasugithub changed the title build(bzlmod): update MODULE.bazel.lock feat(toolchain): centralize S-CORE toolchain configurations and compiler warning policies Sep 18, 2026
…figuration

- Resolve conflicts in:
  - BUILD
  - MODULE.bazel
  - MODULE.bazel.lock
  - score/component_example/BUILD

Signed-off-by: Srinivasu K <srinivasu.kandukuri@in.bosch.com>
@github-actions

Copy link
Copy Markdown
Contributor

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

Comment on lines 14 to +19
build:_score_common --cxxopt=-Wno-error=mismatched-new-delete
build:_score_common --cxxopt=-Wno-error=redundant-decls
build:_score_common --cxxopt=-Wno-error=stringop-overflow
build:_score_common --host_cxxopt=-Wno-error=mismatched-new-delete
build:_score_common --host_cxxopt=-Wno-error=redundant-decls
build:_score_common --host_cxxopt=-Wno-error=stringop-overflow

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.

Dont these belong to policies? I'm not sure how, but somehow.
@nradakovic

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.

Well we do not define these particular set of flag.
But this is not for target code. It's for host execution tools.

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.

First two are target flags. But regardless, do we do that here or in cpp policies?

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.

If this is something that we want to have by default for all modules, then in cpp policies. Not here.

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.

this is the default for all modules if we sync it 😆

--> don't add the 5 new lines here. Content wise I'm not even sure they should be centralized

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.

lets exclude these for now from this PR

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

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.

Comment thread MODULE.bazel
@AlexanderLanin AlexanderLanin moved this from In Progress to in review in INF - Infrastructure Community Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: in review

Development

Successfully merging this pull request may close these issues.

4 participants