Skip to content

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

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

srinivasugithub wants to merge 23 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>
@srinivasugithub
srinivasugithub deployed to workflow-approval September 16, 2026 12:05 — with GitHub Actions Active
@srinivasugithub
srinivasugithub force-pushed the feature/S-CORE_global_toolchain_configuration branch from 3c20e08 to e977602 Compare September 17, 2026 07:40
@srinivasugithub
srinivasugithub force-pushed the feature/S-CORE_global_toolchain_configuration branch from e977602 to bbe0482 Compare September 17, 2026 07:48
@srinivasugithub
srinivasugithub force-pushed the feature/S-CORE_global_toolchain_configuration branch from 389d0ab to c65df73 Compare September 17, 2026 08:30
@srinivasugithub
srinivasugithub force-pushed the feature/S-CORE_global_toolchain_configuration branch from b83d44e to 5397b5c Compare September 17, 2026 08:44
Remove score_itf patch override and hedron_compile_commands to match upstream and fix Bazel loading errors on CI.

Signed-off-by: Srinivasu K <srinivasu.kandukuri@in.bosch.com>
srinivasugithub and others added 3 commits September 17, 2026 09:19
Align MODULE.bazel dependency versions (score_docs_as_code, score_platform, score_rules_imagefs) and dev_dependency declarations to match upstream main and fix CI build/verification check failures.

Signed-off-by: Srinivasu K <srinivasu.kandukuri@in.bosch.com>
Comment thread .bazelrc
build:x86_64-linux --platforms=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix
build:x86_64-linux --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0
build:x86_64-linux --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu
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.

Here it's x86_64-linux and in the provided common config it's score-linux-x86_64?!

Personally I don't have strong feelings, but I like the latter. We should align the naming (after this PR has landed).

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.

I prefer the former, but nevertheless we should use name from the common config so that it is the same between modules.

Comment thread .bazelrc
build:x86_64-linux --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0
build:x86_64-linux --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu
build:x86_64-linux --config=score-linux-x86_64
build:x86_64-linux --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu_miri

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 needs to be added to the common bazelrc (after this initial PR)?

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.

yes, i will create PR for module template

Comment thread .bazelrc
test:unit-tests-x86_64-qnx --//config:unit_mode=qemu

# Target configuration for CPU:AArch64|OS:QNX build (do not use it in case of system toolchains!)
# Target configuration for CPU:AArch64|OS:QNX build (repository-specific addition)

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 needs to be added to the common bazelrc (after this initial PR)?

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.

yes, i will create PR for module template repo

Comment thread MODULE.bazel
# Compiler-warning features are owned by score_cpp_policies
_WARNING_ENABLED_FEATURES = [
"@score_cpp_policies//warnings/gcc/features:minimal_warnings",
"@score_cpp_policies//warnings/gcc/features:warnings_as_errors",

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.

How are the compiler warnings from @score_cpp_policies now handled?

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.

8 participants