diff --git a/.bazelrc b/.bazelrc index 5dfac971c1..fd22d465ac 100644 --- a/.bazelrc +++ b/.bazelrc @@ -15,12 +15,12 @@ common --registry=https://raw.githubusercontent.com/eclipse-score/bazel_registry common --registry=https://bcr.bazel.build -# Flags needed by score-baselibs and communication modules. +# Flags needed by score_baselibs and communication modules. # Do not add more! -build --@score-baselibs//score/mw/log/detail/flags:KUse_Stub_Implementation_Only=False -build --@score-baselibs//score/mw/log/flags:KRemote_Logging=False -build --@score-baselibs//score/json:base_library=nlohmann -build --@communication//score/mw/com/flags:tracing_library=stub +build --@score_baselibs//score/mw/log/detail/flags:KUse_Stub_Implementation_Only=False +build --@score_baselibs//score/mw/log/flags:KRemote_Logging=False +build --@score_baselibs//score/json:base_library=nlohmann +build --@score_communication//score/mw/com/flags:tracing_library=stub # stop legacy behavior of creating __init__.py files build --incompatible_default_to_explicit_init_py diff --git a/.github/workflows/test_integration.yml b/.github/workflows/test_integration.yml index 40837fec70..6f4fc00dd9 100644 --- a/.github/workflows/test_integration.yml +++ b/.github/workflows/test_integration.yml @@ -18,10 +18,28 @@ name: Bazel Build some repositories on: workflow_dispatch: push: + pull_request: jobs: integration_test: runs-on: ubuntu-latest steps: + - name: Show disk space before build + run: | + echo 'Disk space before build:' + df -h + - name: Removing unneeded software + run: | + echo "Removing unneeded software... " + if [ -d /usr/share/dotnet ]; then echo "Removing dotnet..."; start=$(date +%s); sudo rm -rf /usr/share/dotnet; end=$(date +%s); echo "Duration: $((end-start))s"; fi + #if [ -d /usr/local/lib/android ]; then echo "Removing android..."; start=$(date +%s); sudo rm -rf /usr/local/lib/android; end=$(date +%s); echo "Duration: $((end-start))s"; fi + if [ -d /opt/ghc ]; then echo "Removing haskell (ghc)..."; start=$(date +%s); sudo rm -rf /opt/ghc; end=$(date +%s); echo "Duration: $((end-start))s"; fi + if [ -d /usr/local/.ghcup ]; then echo "Removing haskell (ghcup)..."; start=$(date +%s); sudo rm -rf /usr/local/.ghcup; end=$(date +%s); echo "Duration: $((end-start))s"; fi + if [ -d /usr/share/swift ]; then echo "Removing swift..."; start=$(date +%s); sudo rm -rf /usr/share/swift; end=$(date +%s); echo "Duration: $((end-start))s"; fi + if [ -d /usr/local/share/chromium ]; then echo "Removing chromium..."; start=$(date +%s); sudo rm -rf /usr/local/share/chromium; end=$(date +%s); echo "Duration: $((end-start))s"; fi + - name: Show disk space after cleanup + run: | + echo 'Disk space after cleanup:' + df -h - name: Checkout repository uses: actions/checkout@v4.2.2 - name: Setup Bazel @@ -33,28 +51,14 @@ jobs: disk-cache: ${{ github.workflow }} # Share repository cache between workflows. repository-cache: true - - name: Show disk space before build - run: | - echo 'Disk space before build:' - df -h - echo 'Inode usage before build:' - df -i - echo 'Largest top-level directories:' - du -h -d 1 2>/dev/null | sort -h | tail -n 20 || true - name: Bazel build targets run: | - echo 'Starting Bazel build (disk space snapshot):' - df -h | sed 's/^/PRE-BUILD DF /' ./integration_test.sh - name: Show disk space after build if: always() run: | echo 'Disk space after build:' df -h - echo 'Inode usage after build:' - df -i - echo 'Largest top-level directories after build:' - du -h -d 1 2>/dev/null | sort -h | tail -n 20 || true - name: Publish build summary if: always() run: | diff --git a/MODULE.bazel b/MODULE.bazel index 247087c4c5..b247657782 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -18,82 +18,40 @@ module( ) include("//:score_modules.MODULE.bazel") +include("//:score_toolchains.MODULE.bazel") -# for building documentation, verifying traceability etc. -bazel_dep(name = "score_platform", version = "0.3.0") -bazel_dep(name = "score_bazel_platforms", version = "0.0.2") -bazel_dep(name = "score_crates", version = "0.0.3") -# QNX toolchain -bazel_dep(name = "score_toolchains_qnx", version = "0.0.2") -toolchains_qnx = use_extension("@score_toolchains_qnx//:extensions.bzl", "toolchains_qnx") -toolchains_qnx.sdp( - sha256 = "f2e0cb21c6baddbcb65f6a70610ce498e7685de8ea2e0f1648f01b327f6bac63", - strip_prefix = "installation", - url = "https://www.qnx.com/download/download/79858/installation.tgz", -) -use_repo(toolchains_qnx, "toolchains_qnx_sdp") -use_repo(toolchains_qnx, "toolchains_qnx_qcc") +## Python +bazel_dep(name = "rules_python", version = "1.4.1") -#gcc toolchain for baselibs -bazel_dep(name = "score_toolchains_gcc", version = "0.5", dev_dependency = False) -gcc = use_extension("@score_toolchains_gcc//extentions:gcc.bzl", "gcc", dev_dependency = False) -gcc.toolchain( - url = "https://github.com/eclipse-score/toolchains_gcc_packages/releases/download/0.0.1/x86_64-unknown-linux-gnu_gcc12.tar.gz", - sha256 = "457f5f20f57528033cb840d708b507050d711ae93e009388847e113b11bf3600", - strip_prefix = "x86_64-unknown-linux-gnu", -) -gcc.extra_features( - features = [ - "minimal_warnings", - "treat_warnings_as_errors", - ], -) -gcc.warning_flags( - minimal_warnings = ["-Wall", "-Wno-error=deprecated-declarations", "-Wno-error=narrowing"], - strict_warnings = ["-Wextra", "-Wpedantic"], - treat_warnings_as_errors = ["-Werror"], -) -use_repo(gcc, "gcc_toolchain", "gcc_toolchain_gcc") -register_toolchains("@gcc_toolchain//:all") +PYTHON_VERSION = "3.12" -bazel_dep(name = "score_test_scenarios", version = "0.3.0") -git_override( - module_name = "score_test_scenarios", - commit = "a2f9cded3deb636f5dc800bf7a47131487119721", # tag v0.3.0 - remote = "https://github.com/eclipse-score/testing_tools.git", +python = use_extension("@rules_python//python/extensions:python.bzl", "python") +python.toolchain( + configure_coverage_tool = True, + is_default = True, + python_version = PYTHON_VERSION, ) +use_repo(python) -# Needed for feature integration tests -bazel_dep(name = "rules_rust", version = "0.61.0") -bazel_dep(name = "score_itf", version = "0.1.0") +# Special imports for certain modules -# # TODO: What is this for? +# communication module dependencies +# archive_override are not forwarded by bazel_dep, so we need to redefine it here archive_override( module_name = "rules_boost", strip_prefix = "rules_boost-master", urls = ["https://github.com/nelhage/rules_boost/archive/refs/heads/master.tar.gz"], ) -# # TODO: we cannot use communication without including TRLC here? -bazel_dep(name = "trlc", version = "0.0.0") +# git_override are not forwarded by bazel_dep, so we need to redefine it here git_override( module_name = "trlc", remote = "https://github.com/bmw-software-engineering/trlc.git", commit = "650b51a47264a4f232b3341f473527710fc32669", # trlc-2.0.2 release ) -# System/Basics - -## Python -bazel_dep(name = "rules_python", version = "1.4.1") - -PYTHON_VERSION = "3.12" - -python = use_extension("@rules_python//python/extensions:python.bzl", "python") -python.toolchain( - configure_coverage_tool = True, - is_default = True, - python_version = PYTHON_VERSION, -) -use_repo(python) +# imports for the feature showcase module +bazel_dep(name = "rules_rust", version = "0.61.0") +bazel_dep(name = "score_itf", version = "0.1.0") +bazel_dep(name = "score_crates", version = "0.0.3") diff --git a/README.md b/README.md index 44430b3e70..d13ec9851b 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,35 @@ -# Reference Integration +# Score Reference Integration -Integration workspace for the Eclipse Score project. This repository is used to validate cross-module builds (e.g. baselibs, communication, persistency, feo, etc.) from a single Bazel workspace. +This workspace integrates multiple Eclipse Score modules (baselibs, communication, persistency, orchestrator, feo, etc.) to validate cross-repository builds and detect integration issues early in the development cycle. -## ✅ Working Build Commands +## Overview -### Baselibs +The reference integration workspace serves as a single Bazel build environment to: +- Validate cross-module dependency graphs +- Detect label and repository boundary issues +- Test toolchain and platform support (Linux, QNX, LLVM/GCC) +- Prepare for release validation workflows + +## Working Builds ✅ +The following modules build successfully with the `bl-x86_64-linux` configuration: + +### Baselibs ```bash -bazel build --config bl-x86_64-linux @score-baselibs//score/... --verbose_failures +bazel build --config bl-x86_64-linux @score_baselibs//score/... --verbose_failures ``` ### Communication - ```bash -bazel build --config bl-x86_64-linux @communication//score/... @communication//third_party/... --verbose_failures +bazel build --config bl-x86_64-linux @score_communication//score/mw/com:com --verbose_failures ``` ### Persistency - ```bash -bazel build \ - @score_persistency//src/... \ - @score_persistency//tests/cpp_test_scenarios/... \ - @score_persistency//tests/rust_test_scenarios/... \ - --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux \ - --copt=-Wno-deprecated-declarations \ - --verbose_failures +bazel build --config bl-x86_64-linux \ + @score_persistency//src/cpp/src/... \ + @score_persistency//src/rust/... \ + --verbose_failures ``` > Note: Python tests for `@score_persistency` cannot be built from this integration workspace due to Bazel external repository visibility limitations. The pip extension and Python dependencies must be accessed within their defining module. @@ -33,7 +37,7 @@ bazel build \ ### Orchestration and `kyron` - async runtime for Rust ```bash -bazel build @score_orchestrator//src/... +bazel build --config bl-x86_64-linux @score_orchestrator//src/... ``` ## Feature showcase examples @@ -42,61 +46,81 @@ You can run them currently for host platform using `--config bl-x86_64-linux`. Execute `bazel query //feature_showcase/...` to obtain list of targets that You can run. -## ⚠️ Observed Issues -### communication: score/mw/com/requirements -Problems when building from a different repo: -- Some `BUILD` files use `@//third_party` instead of `//third_party` (repository-qualified vs. local label mismatch). -- `runtime_test.cpp:get_path` is checking `safe_posix_platform` (likely an outdated module name) instead of `external/communication+/`. -- fixed in feature/build_from_reference_repo https://github.com/etas-contrib/score_communication.git +```bash +bazel build --config bl-x86_64-linux @score_orchestrator//src/... --verbose_failures +``` -### communication: get_git_info -@communication//third_party/... here get_git_info is causing problems because it cannot find github root from e.g. -/home/runner/.bazel/sandbox/processwrapper-sandbox/1689/execroot/_main/bazel-out/k8-opt-exec-ST-8abfa5a323e1/bin/external/communication+/third_party/traceability/tools/source_code_linker/parsed_source_files_for_source_code_linker.runfiles/communication+/third_party/traceability/tools/source_code_linker/get_git_info.py -is this needed? should we fix it? +## Known Issues ⚠️ -### Toolchain / Version Drift -- Persistency uses `llvm_toolchain 1.2.0` while baselibs uses `1.4.0`. Aligning versions may reduce incompatibilities. Also Persistency does not work with `1.4.0`. +### Orchestrator +**Issue:** Direct toolchain loading at `BUILD:14` +``` +load("@score_toolchains_qnx//rules/fs:ifs.bzl", "qnx_ifs") +``` +**Resolution needed:** Refactor to use proper toolchain resolution instead of direct load statements. -## 🚧 Not Yet Working +**Issue:** clang needs to be installed +``` +sudo apt install clang +``` +**Resolution needed:** why is this happening with -extra_toolchains=@gcc_toolchain//:host_gcc_12 ? -```bash -bazel build @score_persistency//src/cpp/... --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux +### Communication +**Module:** `score/mw/com/requirements` +**Issues when building from external repository:** +1. **Label inconsistency:** Some `BUILD` files use `@//third_party` instead of `//third_party` (repository-qualified vs. local label). Should standardize on local labels within the module. +2. **Outdated path reference:** `runtime_test.cpp:get_path` checks for `safe_posix_platform` (likely obsolete module name) instead of `external/score_communication+/`. + +### Persistency +**Test failures in `src/cpp/tests`:** +1. **Dependency misconfiguration:** `google_benchmark` should not be a dev-only dependency if required by tests. Consider separating benchmark targets. +2. **Compiler-specific issue in `test_kvs.cpp`:** Contains GCC-specific self-move handling that is incorrect and fails with GCC (only builds with LLVM). Needs portable fix or removal of undefined behavior. + +## Build Blockers 🚧 + +The following builds are currently failing: + +### FEO (Full Build) +```bash bazel build @feo//... --verbose_failures ``` - +### Persistency (Full Build) ```bash -bazel mod graph +bazel build --config bl-x86_64-linux @score_persistency//src/... --verbose_failures ``` -It is working with latest baselibs (dev_dependency = True for score_toolchains_qnx), but communication is not building with it. -### Missing System Packages (for feo build) -Install required system dependencies: +## System Dependencies + +### Required Packages for FEO +Install the following system packages before building FEO: ```bash sudo apt-get update sudo apt-get install -y protobuf-compiler libclang-dev ``` -## 🧪 To Be Done +## Pending Tasks 🧪 -```bash -bazel test @itf//... -``` +- [ ] Add test targets once cross-repository visibility constraints are clarified +- [ ] Normalize third-party label usage across all `BUILD` files +- [ ] Resolve FEO build failures +- [ ] Fix Persistency full build +- [ ] Address compiler-specific issues in test suites -Add test targets once cross-repo visibility constraints are clarified. +## Proxy & External Dependencies 🌐 -Configuration handling (instead of baselibs.bazelrc,...) +### Current Issue -## 🌐 Proxy & Dependency Handling +The `starpls.bzl` file ([source](https://github.com/eclipse-score/tooling/blob/main/starpls/starpls.bzl)) uses `curl` directly for downloading dependencies, which: +- Bypasses Bazel's managed fetch lifecycle and dependency tracking +- Breaks reproducibility and remote caching expectations +- May fail in corporate proxy-restricted environments -`starpls.bzl` (see: https://github.com/eclipse-score/tooling/blob/main/starpls/starpls.bzl) uses `curl` directly, which: -- Bypasses Bazel's fetch/dependency tracking. -- May fail in a proxy-restricted environment. +### Workaround -### Possible Workaround -Use a `local_path_override` and set proxy environment variables before invoking the rule: +Use a `local_path_override` and configure proxy environment variables before building: ```bash export http_proxy=http://127.0.0.1:3128 @@ -105,7 +129,7 @@ export HTTP_PROXY=http://127.0.0.1:3128 export HTTPS_PROXY=http://127.0.0.1:3128 ``` -Example Bazel module override snippet: +Add this to your `MODULE.bazel`: ```python local_path_override(module_name = "score_tooling", path = "../tooling") ``` @@ -114,27 +138,11 @@ local_path_override(module_name = "score_tooling", path = "../tooling") - Replace raw `curl` calls with Bazel `http_archive` or `repository_ctx.download` for reproducibility. - Parameterize proxy usage via environment or Bazel config flags. -## 🔍 Next Investigation Targets -- Normalize third-party label usage (`@//third_party` vs `//third_party`). -- Update `runtime_test.cpp:get_path` logic for new module layout. -- Unify LLVM toolchain versions across modules. -- Introduce integration tests for `@itf` once build succeeds. - ## IDE support ### Rust Use `./generate_rust_analyzer_support.sh` to generate rust_analyzer settings that will let VS Code work. -## 📌 Quick Reference - -| Area | Status | Action | -|------|--------|--------| -| baselibs build | ✅ | Keep as baseline | -| communication build | ✅ | Fix label style inconsistencies | -| persistency (Python tests) | 🚫 | Not supported cross-repo | -| feo build | ❌ | Install system deps + inspect failures | -| itf tests | ⏳ | Add after build stabilization | - ## 🗂 Notes Keep this file updated as integration issues are resolved. Prefer converting ad-hoc shell steps into Bazel rules or documented scripts under `tools/` for repeatability. diff --git a/integration_test.sh b/integration_test.sh index b8593a52ce..e950eb92c1 100755 --- a/integration_test.sh +++ b/integration_test.sh @@ -10,11 +10,11 @@ SUMMARY_FILE=${SUMMARY_FILE:-_logs/build_summary.md} mkdir -p "${LOG_DIR}" || true declare -A BUILD_TARGET_GROUPS=( - [baselibs]="@score-baselibs//score/..." - [communication]="@communication//score/... @communication//third_party/..." - [persistency]="@score_persistency//src/... @score_persistency//tests/cpp_test_scenarios/... @score_persistency//tests/rust_test_scenarios/..." - [score-mw-log]="@score-mw-log//src/..." - [score-orchestrator]="@score_orchestrator//src/..." + [baselibs]="@score_baselibs//score/..." + [score_communication]="@score_communication//score/mw/com:com" + [persistency]="@score_persistency//src/cpp/src/... @score_persistency//src/rust/..." + #[score_logging]="@score_logging//src/..." + [score_orchestrator]="@score_orchestrator//src/..." ) warn_count() { @@ -53,22 +53,10 @@ for group in "${!BUILD_TARGET_GROUPS[@]}"; do # GitHub Actions log grouping start echo "::group::Bazel build (${group})" start_ts=$(date +%s) - if [[ "$group" == "persistency" ]]; then - # Extra flags only for persistency group. - set +e - bazel build --config "${CONFIG}" \ - ${targets} \ - --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux \ - --copt=-Wno-deprecated-declarations \ - --verbose_failures 2>&1 | tee "$log_file" - build_status=${PIPESTATUS[0]} - set -e - else - set +e - bazel build --config "${CONFIG}" ${targets} --verbose_failures 2>&1 | tee "$log_file" - build_status=${PIPESTATUS[0]} - set -e - fi + set +e + bazel build --config "${CONFIG}" ${targets} --verbose_failures 2>&1 | tee "$log_file" + build_status=${PIPESTATUS[0]} + set -e echo "::endgroup::" # End Bazel build group end_ts=$(date +%s) duration=$(( end_ts - start_ts )) diff --git a/known_good.json b/known_good.json deleted file mode 100644 index 80969b5bd3..0000000000 --- a/known_good.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "timestamp": "2025-08-13T12:55:10Z", - "modules": [ - { - "name": "score-baselibs", - "hash": "5b3a469d80c6480f633ffc789ffb1277ee89fd7f", - "repo": "https://github.com/etas-contrib/score_baselibs.git" - }, - { - "name": "score-mw-log", - "hash": "fffdb25cd7784c46a4e6d72b46309790f1fcd9ed", - "repo": "https://github.com/eclipse-score/logging.git" - }, - { - "name": "score_persistency", - "hash": "c3b737bb45ba9ddc9db0a3940ab2490c75fc3c02", - "repo": "https://github.com/eclipse-score/persistency.git" - }, - { - "name": "inc_orchestrator", - "hash": "9f8ed482bdf786117eb3c4c1be14a1ee58a120ab", - "repo": "https://github.com/eclipse-score/inc_orchestrator.git" - }, - { - "name": "communication", - "hash": "f9db227e7e78be748dbd07090886739da38d004c", - "repo": "https://github.com/etas-contrib/score_communication.git" - }, - { - "name": "score_tooling", - "hash": "b8f58954485d8a19856a3aacdc69a6cbdd12972d", - "repo": "https://github.com/eclipse-score/tooling.git" - } - ], - "manifest_sha256": "4c9b7f...", - "suite": "full", - "duration_s": 742 -} \ No newline at end of file diff --git a/score_modules.MODULE.bazel b/score_modules.MODULE.bazel index 2e359ce901..a4fb074be0 100644 --- a/score_modules.MODULE.bazel +++ b/score_modules.MODULE.bazel @@ -1,55 +1,55 @@ -# will be generated from known-good.json by script later +# ******************************************************************************* +# Copyright (c) 2025 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* -# Dependencies for integration - -## --- baselibs --- -bazel_dep(name = "score-baselibs", version = "0.0.0") -git_override( - module_name = "score-baselibs", - remote = "https://github.com/etas-contrib/score_baselibs.git", - commit = "5b3a469d80c6480f633ffc789ffb1277ee89fd7f", - # TODO: change to eclipse-score repo and a proper commit +bazel_dep(name = "score_baselibs") +single_version_override( + module_name = "score_baselibs", + version = "0.1.3", ) -## --- logging --- -bazel_dep(name = "score-mw-log", version = "0.0.0") -git_override( - module_name = "score-mw-log", - remote = "https://github.com/eclipse-score/logging.git", - # 2025-10-24 - commit = "fffdb25cd7784c46a4e6d72b46309790f1fcd9ed", +bazel_dep(name = "score_communication") +single_version_override( + module_name = "score_communication", + version = "0.1.1", ) -## --- persistency --- -bazel_dep(name = "score_persistency", version = "0.0.0") +bazel_dep(name = "score_persistency") git_override( module_name = "score_persistency", - remote = "https://github.com/qorix-group/persistency.git", - #commit = "d911c73f58b1e02187e40902e9005c6d6f99cc1f", - commit = "02195a843d6b927c30dc0baa3f0a23af87be1c17", + remote = "https://github.com/eclipse-score/persistency.git", + commit = "393c1c30e6959ff5befe85751baee8a8cd8024e9", # Nov 7, 2025, 7:37 AM GMT+1 ) -## --- orchestration --- -bazel_dep(name = "score_orchestrator", version = "0.0.2") -git_override( +bazel_dep(name = "score_orchestrator") +single_version_override( module_name = "score_orchestrator", - remote = "https://github.com/eclipse-score/orchestrator.git", - commit = "ef7b2f2b339134daf281d3913d3a172cd252bf94", + version = "0.0.3", ) -## --- communication --- -bazel_dep(name = "communication", version = "0.0.0") -git_override( - module_name = "communication", - remote = "https://github.com/etas-contrib/score_communication.git", - commit = "f9db227e7e78be748dbd07090886739da38d004c", - # TODO: change to eclipse-score repo and a proper commit +bazel_dep(name = "score_tooling") +single_version_override( + module_name = "score_tooling", + version = "1.0.2", ) -# Tooling -bazel_dep(name = "score_tooling", version = "0.0.0") -git_override( - module_name = "score_tooling", - remote = "https://github.com/eclipse-score/tooling.git", - commit = "b8f58954485d8a19856a3aacdc69a6cbdd12972d", +bazel_dep(name = "score_platform") +single_version_override( + module_name = "score_platform", + version = "0.3.0", +) + +bazel_dep(name = "score_bazel_platforms") +single_version_override( + module_name = "score_bazel_platforms", + version = "0.0.2", ) diff --git a/score_toolchains.MODULE.bazel b/score_toolchains.MODULE.bazel new file mode 100644 index 0000000000..2ebf510c99 --- /dev/null +++ b/score_toolchains.MODULE.bazel @@ -0,0 +1,52 @@ +# ******************************************************************************* +# Copyright (c) 2025 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* + +# QNX toolchain +bazel_dep(name = "score_toolchains_qnx", version = "0.0.2") +toolchains_qnx = use_extension("@score_toolchains_qnx//:extensions.bzl", "toolchains_qnx") +toolchains_qnx.sdp( + sha256 = "f2e0cb21c6baddbcb65f6a70610ce498e7685de8ea2e0f1648f01b327f6bac63", + strip_prefix = "installation", + url = "https://www.qnx.com/download/download/79858/installation.tgz", +) +use_repo(toolchains_qnx, "toolchains_qnx_sdp") +use_repo(toolchains_qnx, "toolchains_qnx_qcc") +use_repo(toolchains_qnx, "toolchains_qnx_ifs") +register_toolchains( + "@toolchains_qnx_ifs//:ifs_x86_64", + "@toolchains_qnx_ifs//:ifs_aarch64", + dev_dependency = True, +) + +#gcc toolchain for baselibs +bazel_dep(name = "score_toolchains_gcc", version = "0.5", dev_dependency = False) +gcc = use_extension("@score_toolchains_gcc//extentions:gcc.bzl", "gcc", dev_dependency = False) +# Align toolchain archive with persistency module (v0.0.3) so its labels (e.g. host_gcc_12) are present. +gcc.toolchain( + url = "https://github.com/eclipse-score/toolchains_gcc_packages/releases/download/v0.0.3/x86_64-unknown-linux-gnu_gcc12.tar.gz", + sha256 = "8fa85c2a93a6bef1cf866fa658495a2416dfeec692e4246063b791abf18da083", + strip_prefix = "x86_64-unknown-linux-gnu", +) +gcc.extra_features( + features = [ + "minimal_warnings", + "treat_warnings_as_errors", + ], +) +gcc.warning_flags( + minimal_warnings = ["-Wall", "-Wno-error=deprecated-declarations", "-Wno-error=narrowing"], + strict_warnings = ["-Wextra", "-Wpedantic"], + treat_warnings_as_errors = ["-Werror"], +) +use_repo(gcc, "gcc_toolchain", "gcc_toolchain_gcc") +register_toolchains("@gcc_toolchain//:all") \ No newline at end of file