Skip to content

build: integrate central S-CORE toolchain configuration - #502

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

build: integrate central S-CORE toolchain configuration#502
srinivasugithub wants to merge 16 commits into
eclipse-score:mainfrom
bgsw-contrib:feature/S-CORE_global_toolchain_configuration

Conversation

@srinivasugithub

@srinivasugithub srinivasugithub commented Aug 21, 2026

Copy link
Copy Markdown

📥 S-CORE Toolchain Configuration Integration

This PR integrates the central S-CORE toolchain configuration from the reference eclipse-score/module_template repository into the score_lifecycle repository.

Our integration ensures that all central toolchains and configurations are adopted 100% unchanged and are elegantly separated from repository-specific additions and overrides.

🌟 Key Changes

  1. MODULE.bazel Alignment:

    • Replaced previous custom toolchains with the central S-CORE Toolchains (DO NOT MODIFY) section.
    • Registered the local/specific score_gcc_aarch64_toolchain separately under a clearly defined "Repository-specific toolchain additions" section.
    • Resolved a package scope issue by explicitly importing score_qcc_aarch64_toolchain_pkg inside our repository-specific section of MODULE.bazel.
  2. Imported Central .bazelrc Configuration:

    • Created score.bazelrc/score_toolchain.bazelrc exactly matching the reference file.
    • Loaded the configuration gracefully inside .bazelrc via try-import.
  3. Optimized .bazelrc profiles:

    • Refactored and simplified x86_64-linux to cleanly inherit from --config=score-linux-x86_64.
    • Refactored and simplified x86_64-qnx to cleanly inherit from --config=score-qnx-x86_64.
    • Completely deleted redundant configuration and the previous toolchain_common block.
    • Retained arm64-linux and arm64-qnx as separate repository-specific additions (inheriting from _score_common).

📊 Configuration Comparison & Gaps Identified

Feature Central Config Repository Config Status / Resolution
x86_64 Linux GCC Aligned & inherited
aarch64 Linux GCC Retained as repository-specific in MODULE.bazel
QNX x86_64 Aligned & inherited
QNX aarch64 Aligned & inherited
Elektobit aarch64 New central toolchain supported
AutoSD10 x86_64/arm64 New central toolchains supported
QNX IFS Toolchain Retained as repository-specific in MODULE.bazel
LLVM Toolchain Retained as repository-specific in MODULE.bazel
Rust Ferrocene Aligned & inherited

🔮 Identified Candidates for Future Centralization

We identified these repository-specific components that could be candidates for future S-CORE integration into module_template:

  1. aarch64 Linux GCC Toolchain: Other projects targeting ARM64 Linux systems will benefit from standardizing this.
  2. QNX IFS (imagefs) Toolchain: Useful to standardise image generation across QNX-based projects.
  3. Sanitizer Configurations: Our custom ASAN, TSAN, UBSAN, and LSAN setup is robust and general enough to be centralized.

🧪 Verification Done

  • C++ builds: Successfully compiled //examples/cpp_lifecycle_app using --config=x86_64-linux on host.
  • C++ unit tests: Successfully executed //score/launch_manager/src/daemon/src/common:identifier_hash_UT with --config=x86_64-linux.
  • Bazel Parsing: Verified that all config profiles load successfully with no syntax or constraint resolution issues.

@github-actions

github-actions Bot commented Aug 21, 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: 207bc302-2c30-4b76-8eab-fd329804a828
Computing main repo mapping: 
Computing main repo mapping: 
Loading: 
Loading: 0 packages loaded
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: 
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 (46 packages loaded, 10 targets configured)

Analyzing: target //:license-check (139 packages loaded, 225 targets configured)

Analyzing: target //:license-check (155 packages loaded, 3236 targets configured)

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

Analyzing: target //:license-check (161 packages loaded, 9365 targets configured)

Analyzing: target //:license-check (168 packages loaded, 9417 targets configured)

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

INFO: Analyzed target //:license-check (173 packages loaded, 11555 targets configured).
[6 / 14] JavaToolchainCompileClasses external/rules_java+/toolchains/platformclasspath_classes; 0s disk-cache
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: 24.020s, Critical Path: 0.27s
INFO: 16 processes: 4 disk cache hit, 12 internal.
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>]

Integrates the S-CORE toolchain configuration from the eclipse-score/module_template
repository into the score_lifecycle project.

- Adopts the S-CORE Toolchains block unchanged in MODULE.bazel.
- Adds score.bazelrc/score_toolchain.bazelrc unchanged from module_template.
- Imports the central score_toolchain.bazelrc file via try-import in .bazelrc.
- Refactors and simplifies .bazelrc profiles to leverage the central profiles (score-linux-x86_64, score-qnx-x86_64), removing redundant configurations.
- Isolates repository-specific additions separate in MODULE.bazel and .bazelrc.
- Adds TOOLCHAIN_INTEGRATION_REPORT.md detailing findings, differences, and candidates for future central standardizations.
@srinivasugithub
srinivasugithub force-pushed the feature/S-CORE_global_toolchain_configuration branch from ecca209 to f767441 Compare August 21, 2026 09:35
Signed-off-by: srinivasugithub <skd1cob@bosch.com>
@danth

danth commented Aug 21, 2026

Copy link
Copy Markdown
Member

Fixes #448

Comment thread .bazelrc Outdated
accept and agree the changes

Co-authored-by: Daniel Thwaites <danth@danth.me>
Signed-off-by: srinivasugithub <skd1cob@bosch.com>
- Adopt the central S-CORE Toolchains (DO NOT MODIFY) section unchanged.
- Segregate repository-specific toolchain extensions (LLVM, QNX UTs).
- Add git_overrides for toolchains_llvm and helly25_bzl to bypass local transparent proxy raw.githubusercontent.com 400 errors.
- Adopt score.bazelrc/score_toolchain.bazelrc unchanged from module_template.
- Refactor .bazelrc to inherit from score-linux-aarch64.
- Synchronize MODULE.bazel.lock with all correct private registry checksums.
Signed-off-by: srinivasugithub <skd1cob@bosch.com>
@RamakrishnanPK

RamakrishnanPK commented Sep 1, 2026

Copy link
Copy Markdown

Fixes #448

Globally suppress the Google Test start and end banners in TestRunner.
This prevents a race condition in the integration test harness
(ITF/DockerTarget's PID parser) where GTest's console output is interleaved on
stdout before the wrapper's PID can be correctly parsed.

Signed-off-by: srinivasugithub <skd1cob@bosch.com>
@AlexanderLanin

Copy link
Copy Markdown
Member

@srinivasugithub can you merge this with upstream main please, there are some conflicts and some suspicious changes like downgrade of docs as code.

…figuration

- Resolve conflicts in MODULE.bazel and MODULE.bazel.lock.
- Prevent downgrade of score_docs_as_code (kept at 8.1.0).
- Preserve module name 'score_lifecycle'.
- Set dev_dependency = True for central S-CORE toolchains and extensions to avoid transitive resolution errors.

Signed-off-by: srinivasugithub <skd1cob@bosch.com>
- Update quality/coverage/coverage.bazelrc to use the central `_score_common` configuration instead of the obsolete `toolchain_common` which was deleted during the toolchain migration. This fixes the failing "Collect coverage" check in CI.
- Insert the blank line in MODULE.bazel required by `bazel mod tidy` to prevent the "Check Bazel module is tidy" check from failing in CI due to formatting mismatch.

Signed-off-by: srinivasugithub <skd1cob@bosch.com>
@srinivasugithub
srinivasugithub deployed to workflow-approval September 3, 2026 07:35 — with GitHub Actions Active
@srinivasugithub
srinivasugithub deployed to workflow-approval September 3, 2026 07:35 — with GitHub Actions Active
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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

int RunTests()
{
::testing::GTEST_FLAG(output) = "xml:" + xmlPath(m_test_path);
::testing::GTEST_FLAG(brief) = true;

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.

What does this do? Is it relevant to this pull request?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Prints only failures instead of hundreds of lines of text.
Great for CI/CD: Makes logs much smaller and easier to find errors quickly.
if you don't like, i will remove it

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

QNX IFS version mismatches break toolchain resolution, and AutoSD AArch64 lacks required common host toolchains.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Integrates centralized S-CORE Bazel toolchain configuration while retaining repository-specific profiles.

Changes:

  • Adds central Linux, QNX, AutoSD, Elektrobit, and Rust toolchains.
  • Refactors platform and coverage profiles to inherit shared configuration.
  • Enables brief GoogleTest output.
File summaries
File Description
.bazelrc Imports central configuration and simplifies platform profiles.
MODULE.bazel Defines central and repository-specific toolchains.
MODULE.bazel.lock Updates resolved toolchain dependencies.
quality/coverage/coverage.bazelrc Migrates coverage to _score_common.
score.bazelrc/score_toolchain.bazelrc Adds central toolchain profiles.
tests/utils/test_helper/test_helper.hpp Enables brief test output.
Review details
  • Files reviewed: 4/6 changed files
  • Comments generated: 5
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .bazelrc

# Enable warnings and treat them as errors
# Import central S-CORE toolchain configuration
import %workspace%/score.bazelrc/score_toolchain.bazelrc
Comment thread MODULE.bazel
imagefs.toolchain(
name = "score_qnx_x86_64_ifs_toolchain",
sdp_to_import = "@score_qcc_x86_64_toolchain_pkg",
sdp_version = "8.0.4",
Comment thread MODULE.bazel
imagefs.toolchain(
name = "score_qnx_aarch64_ifs_toolchain",
sdp_to_import = "@score_qcc_aarch64_toolchain_pkg",
sdp_version = "8.0.4",
build:score-autosd-x86_64 --platforms=@score_bazel_platforms//:x86_64-linux-autosd10
build:score-autosd-x86_64 --extra_toolchains=@score_autosd10_x86_64_toolchain//:x86_64-linux-autosd10

build:score-autosd-aarch64 --force_pic
Comment thread MODULE.bazel
version = "12.2.0",
)

## Elektobit Toolchains

@MaciejKaszynski MaciejKaszynski left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems we are not passing the QNX builds with this
ERROR: /home/runner/work/lifecycle/lifecycle/score/launch_manager/src/daemon/src/configuration/BUILD:49:11: While resolving toolchains for target //score/launch_manager/src/daemon/src/configuration:recovery_action_config (f31458d): invalid registered toolchain '@score_qnx_x86_64_ifs_toolchain//:ifs-x86_64-qnx-sdp_8.0.0': no such target '@@score_rules_imagefs++imagefs+score_qnx_x86_64_ifs_toolchain//:ifs-x86_64-qnx-sdp_8.0.0': target 'ifs-x86_64-qnx-sdp_8.0.0' not declared in package '' defined by /home/runner/.bazel/external/score_rules_imagefs++imagefs+score_qnx_x86_64_ifs_toolchain/BUILD (did you mean ifs-x86_64-qnx-sdp_8.0.4?)

https://github.com/eclipse-score/lifecycle/actions/runs/33728871587/job/100974181426?pr=502#step:7:28

I'm not sure of the source of the error, but seems like something to do with building the qnx image? https://github.com/eclipse-score/lifecycle/blob/14bb6cf697f8b4883c65de0514c7228dd0eff8e5/tests/utils/environments/x86_64-qnx/BUILD

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

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

6 participants