diff --git a/.bazelrc b/.bazelrc index 06d83071e9..94cb983a3b 100644 --- a/.bazelrc +++ b/.bazelrc @@ -28,7 +28,10 @@ build --java_runtime_version=remotejdk_17 build --tool_java_runtime_version=remotejdk_17 build --credential_helper=*.qnx.com=%workspace%/scripts/internal/qnx_creds.py -# Enable warnings and treat them as errors +# Import central S-CORE toolchain configuration +import %workspace%/score.bazelrc/score_toolchain.bazelrc + +# Treat warnings as errors, except in external code build --copt=-Wall build --copt=-Wextra build --copt=-Werror @@ -46,10 +49,6 @@ import %workspace%/quality/coverage/coverage.bazelrc # Common Lifecycle Toolchain flags for build (do not use it in case of system toolchains!) -build:toolchain_common --incompatible_strict_action_env -build:toolchain_common --host_platform=@score_bazel_platforms//:x86_64-linux -## Ferrocene must be common compiler for HOST. To ensure metadata compatibility for proc macro crate -build:toolchain_common --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu build:stub --@score_baselibs//score/mw/log/flags:KRemote_Logging=False build:stub --@score_baselibs//score/json:base_library=nlohmann @@ -57,22 +56,17 @@ build:stub --@score_baselibs//score/json:base_library=nlohmann build:host --//config:integration_mode=host build:host --//config:unit_mode=host -# Target configuration for CPU:x86-64|OS:Linux build (do not use it in case of system toolchains!) +# Target configuration for CPU:x86-64|OS:Linux build (leveraging central configuration) build:x86_64-linux --config=stub -build:x86_64-linux --config=toolchain_common -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 build:x86_64-linux --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu_miri test:x86_64-linux --//config:integration_mode=docker test:x86_64-linux --//config:unit_mode=host -# Target configuration for CPU:AArch64|OS:Linux build (do not use it in case of system toolchains!) +# Target configuration for CPU:AArch64|OS:Linux build (repository-specific addition leveraging central configuration) build:arm64-linux --config=stub -build:arm64-linux --config=toolchain_common -build:arm64-linux --platforms=@score_bazel_platforms//:aarch64-linux-gcc_12.2.0-posix -build:arm64-linux --extra_toolchains=@score_gcc_aarch64_toolchain//:aarch64-linux-gcc_12.2.0 +build:arm64-linux --config=score-linux-aarch64 build:arm64-linux --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_aarch64_unknown_linux_gnu build:arm64-linux --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_aarch64_unknown_linux_gnu_miri build:arm64-linux --copt=-mno-outline-atomics @@ -81,13 +75,9 @@ build:arm64-linux --linkopt=-latomic test:arm64-linux --//config:integration_mode=docker test:arm64-linux --//config:unit_mode=host -# Target configuration for CPU:x86-64|OS:QNX build (do not use it in case of system toolchains!) +# Target configuration for CPU:x86-64|OS:QNX build (leveraging central configuration) build:x86_64-qnx --config=stub -build:x86_64-qnx --config=toolchain_common -build:x86_64-qnx --platforms=@score_bazel_platforms//:x86_64-qnx-sdp_8.0.0-posix -build:x86_64-qnx --extra_toolchains=@score_qcc_x86_64_toolchain//:x86_64-qnx-sdp_8.0.0 -build:x86_64-qnx --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_pc_nto_qnx800 -build:x86_64-qnx --extra_toolchains=@score_qnx_x86_64_ifs_toolchain//:ifs-x86_64-qnx-sdp_8.0.0 +build:x86_64-qnx --config=score-qnx-x86_64 test:x86_64-qnx --//config:integration_mode=qemu test:x86_64-qnx --//config:unit_mode=skip @@ -98,9 +88,9 @@ test:unit-tests-x86_64-qnx --run_under=@score_qnx_unit_tests//src:run_under_qnx test:unit-tests-x86_64-qnx --//config:integration_mode=skip 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) build:arm64-qnx --config=stub -build:arm64-qnx --config=toolchain_common +build:arm64-qnx --config=_score_common build:arm64-qnx --incompatible_strict_action_env build:arm64-qnx --platforms=@score_bazel_platforms//:aarch64-qnx-sdp_8.0.0-posix build:arm64-qnx --extra_toolchains=@score_qcc_aarch64_toolchain//:aarch64-qnx-sdp_8.0.0 diff --git a/MODULE.bazel b/MODULE.bazel index d3c2c6f11f..7ec8c6dfd3 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -32,7 +32,6 @@ bazel_dep(name = "google_benchmark", version = "1.9.5", dev_dependency = True) bazel_dep(name = "score_docs_as_code", version = "8.1.0") -bazel_dep(name = "score_bazel_platforms", version = "1.1.0", dev_dependency = True) bazel_dep(name = "score_tooling", version = "2.2.1", dev_dependency = True) bazel_dep(name = "score_rust_policies", version = "0.0.5", dev_dependency = True) bazel_dep(name = "score_cpp_policies", version = "0.1.1", dev_dependency = True) @@ -40,10 +39,18 @@ bazel_dep(name = "score_devcontainer", version = "1.11.0", dev_dependency = True bazel_dep(name = "score_process_description", version = "2.1.2", dev_dependency = True) bazel_dep(name = "score_platform", version = "0.7.1", dev_dependency = True) -## Configure the C++ toolchain +############################################################################### +# +# S-CORE Toolchains (DO NOT MODIFY) +# +############################################################################### bazel_dep(name = "score_bazel_cpp_toolchains", version = "1.0.3", dev_dependency = True) +bazel_dep(name = "score_bazel_platforms", version = "1.1.0", dev_dependency = True) +# GCC Toolchains gcc = use_extension("@score_bazel_cpp_toolchains//extensions:gcc.bzl", "gcc", dev_dependency = True) + +## Linux Toolchains gcc.toolchain( name = "score_gcc_x86_64_toolchain", target_cpu = "x86_64", @@ -58,15 +65,100 @@ gcc.toolchain( use_default_package = True, version = "12.2.0", ) + +## Elektobit Toolchains gcc.toolchain( - name = "score_qcc_x86_64_toolchain", - sdp_version = "8.0.4", + name = "score_ebclfsa_toolchain", + runtime_ecosystem = "ebclfsa", + sdk_version = "0.1.0", + target_cpu = "aarch64", + target_os = "linux", + use_default_package = True, +) + +## AutoSD10 Toolchains +gcc.toolchain( + name = "score_autosd10_x86_64_toolchain", + runtime_ecosystem = "autosd10", target_cpu = "x86_64", - target_os = "qnx", + target_os = "linux", use_default_package = True, - version = "12.2.0", ) gcc.toolchain( + name = "score_autosd10_aarch64_toolchain", + runtime_ecosystem = "autosd10", + target_cpu = "aarch64", + target_os = "linux", + use_default_package = True, +) +use_repo( + gcc, + "score_autosd10_aarch64_toolchain", + "score_autosd10_x86_64_toolchain", + "score_ebclfsa_toolchain", + "score_gcc_aarch64_toolchain", + "score_gcc_x86_64_toolchain", +) + +# Rust Toolchains +bazel_dep(name = "score_toolchains_rust", version = "0.10.0", dev_dependency = True) + +ferrocene = use_extension( + "@score_toolchains_rust//extensions:ferrocene_toolchain_ext.bzl", + "ferrocene_toolchain_ext", + dev_dependency = True, +) +ferrocene.toolchain( + name = "ferrocene_aarch64_ebclfsa", + coverage_tools_sha256 = "497958e925bc94833ea226d68f6d5ba38bd890f571c73e230141d2923e30dd94", + coverage_tools_strip_prefix = "779fbed05ae9e9fe2a04137929d99cc9b3d516fd/x86_64-unknown-linux-gnu", + coverage_tools_url = "https://github.com/eclipse-score/ferrocene_toolchain_builder/releases/download/1.0.1/coverage-tools-779fbed05ae9e9fe2a04137929d99cc9b3d516fd-x86_64-unknown-linux-gnu.tar.gz", + exec_triple = "x86_64-unknown-linux-gnu", + extra_rustc_flags = [ + "-Clink-arg=-Wl,--no-as-needed", + "-Clink-arg=-lstdc++", + "-Clink-arg=-static-libstdc++", + "-Clink-arg=-static", + "-Clink-arg=-lm", + "-Clink-arg=-lc", + ], + sha256 = "b1f1eb1146bf595fe1f4a65d5793b7039b37d2cb6d395d1c3100fa7d0377b6c9", + target_compatible_with = [ + "@platforms//cpu:aarch64", + "@platforms//os:linux", + ], + target_triple = "aarch64-unknown-linux-gnu", + url = "https://github.com/eclipse-score/ferrocene_toolchain_builder/releases/download/1.0.1/ferrocene-779fbed05ae9e9fe2a04137929d99cc9b3d516fd-aarch64-unknown-linux-gnu.tar.gz", +) +use_repo( + ferrocene, + "ferrocene_aarch64_ebclfsa", +) + +# QNX Toolchains +bazel_dep(name = "score_rules_imagefs", version = "0.0.4", dev_dependency = True) + +imagefs = use_extension("@score_rules_imagefs//extensions:imagefs.bzl", "imagefs", dev_dependency = True) +imagefs.toolchain( + name = "score_qnx_x86_64_ifs_toolchain", + sdp_to_import = "@score_qcc_x86_64_toolchain_pkg", + sdp_version = "8.0.4", + target_cpu = "x86_64", + target_os = "qnx", + type = "ifs", +) +imagefs.toolchain( + name = "score_qnx_aarch64_ifs_toolchain", + sdp_to_import = "@score_qcc_aarch64_toolchain_pkg", + sdp_version = "8.0.4", + target_cpu = "aarch64", + target_os = "qnx", + type = "ifs", +) +use_repo(imagefs, "score_qnx_aarch64_ifs_toolchain", "score_qnx_x86_64_ifs_toolchain") + +qcc = use_extension("@score_bazel_cpp_toolchains//extensions:gcc.bzl", "gcc", dev_dependency = True) +qcc.toolchain( name = "score_qcc_aarch64_toolchain", sdp_version = "8.0.4", target_cpu = "aarch64", @@ -74,18 +166,34 @@ gcc.toolchain( use_default_package = True, version = "12.2.0", ) +qcc.toolchain( + name = "score_qcc_x86_64_toolchain", + sdp_version = "8.0.4", + target_cpu = "x86_64", + target_os = "qnx", + use_default_package = True, + version = "12.2.0", +) use_repo( - gcc, - "score_gcc_aarch64_toolchain", - "score_gcc_x86_64_toolchain", + qcc, "score_qcc_aarch64_toolchain", "score_qcc_aarch64_toolchain_pkg", "score_qcc_x86_64_toolchain", "score_qcc_x86_64_toolchain_pkg", ) +############################################################################### +# +# Repository-specific Toolchains & Testing Configurations +# +############################################################################### # LLVM toolchain (used for clang-format, clang-tidy and LLVM source-based coverage) bazel_dep(name = "toolchains_llvm", version = "1.8.0", dev_dependency = True) +git_override( + module_name = "toolchains_llvm", + commit = "332d6856cf41452acbd0ee2636e00232c251dd65", + remote = "https://github.com/bazel-contrib/toolchains_llvm.git", +) llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm", dev_dependency = True) llvm.toolchain( @@ -109,30 +217,6 @@ git_override( remote = "https://github.com/eclipse-score/qnx_unit_tests.git", ) -bazel_dep(name = "score_rules_imagefs", version = "0.0.4", dev_dependency = True) - -imagefs = use_extension("@score_rules_imagefs//extensions:imagefs.bzl", "imagefs", dev_dependency = True) -imagefs.toolchain( - name = "score_qnx_x86_64_ifs_toolchain", - sdp_to_import = "@score_qcc_x86_64_toolchain_pkg", - sdp_version = "8.0.0", - target_cpu = "x86_64", - target_os = "qnx", - type = "ifs", -) -imagefs.toolchain( - name = "score_qnx_aarch64_ifs_toolchain", - sdp_to_import = "@score_qcc_aarch64_toolchain_pkg", - sdp_version = "8.0.0", - target_cpu = "aarch64", - target_os = "qnx", - type = "ifs", -) -use_repo(imagefs, "score_qnx_aarch64_ifs_toolchain", "score_qnx_x86_64_ifs_toolchain") - -## Rust Toolchain -bazel_dep(name = "score_toolchains_rust", version = "0.10.0", dev_dependency = True) - # S-CORE crates bazel_dep(name = "score_crates", version = "0.0.10") git_override( diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index c6b2bbc514..3c9517c716 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -579,8 +579,6 @@ "https://bcr.bazel.build/modules/tar.bzl/0.7.0/MODULE.bazel": "cc1acd85da33c80e430b65219a620d54d114628df24a618c3a5fa0b65e988da9", "https://bcr.bazel.build/modules/tar.bzl/0.7.0/source.json": "9becb80306f42d4810bfa16379fb48aad0b01ce5342bc12fe47dcd6af3ac4d7a", "https://bcr.bazel.build/modules/toolchain_utils/1.0.2/MODULE.bazel": "9b8be503a4fcfd3b8b952525bff0869177a5234d5c35dc3e566b9f5ca2f755a1", - "https://bcr.bazel.build/modules/toolchains_llvm/1.8.0/MODULE.bazel": "68259b66e5fb84f94fa37125ad476c3eb8edf602a34bf58377cde9a16dd8fa98", - "https://bcr.bazel.build/modules/toolchains_llvm/1.8.0/source.json": "70d80fe5b626a3fadf812af41dda4a028640a1184f5a3c7e6cb20130d93ed783", "https://bcr.bazel.build/modules/toolchains_protoc/0.2.1/MODULE.bazel": "2f08433ff5e659069b3a1abfee2377d68f510f2de1da50678ed992c455b4ff91", "https://bcr.bazel.build/modules/trlc/2.0.5/MODULE.bazel": "0e65fc48ef40d16ee449e4913b487228428a12f97e50cc97c496400cf28038a8", "https://bcr.bazel.build/modules/trlc/3.0.0/MODULE.bazel": "45444f9112300e7a716bf842beb17ed8f84d7d1f84c3d1ed126f57bec9bdf2a9", @@ -1135,7 +1133,6 @@ "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/tar.bzl/0.6.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/tar.bzl/0.7.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/toolchain_utils/1.0.2/MODULE.bazel": "not found", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/toolchains_llvm/1.8.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/toolchains_protoc/0.2.1/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/trlc/2.0.5/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/trlc/3.0.0/MODULE.bazel": "not found", @@ -11128,7 +11125,7 @@ "@@score_bazel_cpp_toolchains+//extensions:gcc.bzl%gcc": { "general": { "bzlTransitiveDigest": "+vgTABLj64cvjmKGlkw+4AJ9S7iLJFRI20t6JpYfRzM=", - "usagesDigest": "WhC3Bfyf/2KNf6Wuh6q5k8gfq44+GP2P8P9YObkw/ro=", + "usagesDigest": "Upk/hLmFMSVjDfxnY+4849KCD/CDP3LKn2sdo44zvfo=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, "envVariables": {}, @@ -11157,25 +11154,61 @@ "strip_prefix": "aarch64-unknown-linux-gnu" } }, - "score_qcc_x86_64_toolchain_pkg": { + "score_ebclfsa_toolchain_pkg": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "urls": [ + "https://github.com/Elektrobit/eb_corbos_toolkit/releases/download/v2.0.0-beta1/fastdev-sdk-ubuntu-ebclfsa-ebcl-qemuarm64.tar.gz" + ], + "build_file": "@@score_bazel_cpp_toolchains+//packages/linux/aarch64/ebclfsa/0.1.0:ebclfsa.BUILD", + "patch_cmds": [], + "sha256": "f44286c28d831dc40acdac08ef49f38a2e9cbb057bea38c25834964693785287", + "strip_prefix": "fastdev-sdk-ubuntu-ebclfsa-ebcl-qemuarm64" + } + }, + "score_autosd10_x86_64_toolchain_pkg": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "urls": [ + "https://github.com/eclipse-score/os_autosd/releases/download/v0.0.2/autosd-toolchain-x86_64.tar.gz" + ], + "build_file": "@@score_bazel_cpp_toolchains+//packages/linux/x86_64/autosd/10.0:autosd.BUILD", + "patch_cmds": [], + "sha256": "25991056bd29d4cb37b11e42d0c09f55dc61d0b9d703f75d854cf614f688c96f", + "strip_prefix": "sysroot" + } + }, + "score_autosd10_aarch64_toolchain_pkg": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "urls": [ + "https://github.com/eclipse-score/os_autosd/releases/download/v0.0.2/autosd-toolchain-aarch64.tar.gz" + ], + "build_file": "@@score_bazel_cpp_toolchains+//packages/linux/aarch64/autosd/10.0:autosd.BUILD", + "patch_cmds": [], + "sha256": "e2f6a21681730e61ce39af19758003ba3568b093956a57cde136d5c73cf6540a", + "strip_prefix": "sysroot" + } + }, + "score_qcc_aarch64_toolchain_pkg": { "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", "attributes": { "urls": [ "https://www.qnx.com/download/download/88447/installation_qnx_804_260520.tar.xz" ], - "build_file": "@@score_bazel_cpp_toolchains+//packages/qnx/x86_64/sdp/8.0.0:sdp.BUILD", + "build_file": "@@score_bazel_cpp_toolchains+//packages/qnx/aarch64/sdp/8.0.0:sdp.BUILD", "patch_cmds": [], "sha256": "146312c0bf22aab66e8294a06403f2ec6cfeeb074d8fa11549faffd84b7fe778", "strip_prefix": "" } }, - "score_qcc_aarch64_toolchain_pkg": { + "score_qcc_x86_64_toolchain_pkg": { "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", "attributes": { "urls": [ "https://www.qnx.com/download/download/88447/installation_qnx_804_260520.tar.xz" ], - "build_file": "@@score_bazel_cpp_toolchains+//packages/qnx/aarch64/sdp/8.0.0:sdp.BUILD", + "build_file": "@@score_bazel_cpp_toolchains+//packages/qnx/x86_64/sdp/8.0.0:sdp.BUILD", "patch_cmds": [], "sha256": "146312c0bf22aab66e8294a06403f2ec6cfeeb074d8fa11549faffd84b7fe778", "strip_prefix": "" @@ -11235,7 +11268,212 @@ "use_base_constraints_only": false } }, - "score_qcc_x86_64_toolchain": { + "score_ebclfsa_toolchain": { + "repoRuleId": "@@score_bazel_cpp_toolchains+//rules:gcc.bzl%gcc_toolchain", + "attributes": { + "extra_compile_flags": [], + "extra_c_compile_flags": [ + "-nostdinc", + "-isystem", + "external/%{toolchain_pkg}%/usr/lib/gcc-cross/aarch64-linux-gnu/13/include", + "-isystem", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include", + "-L", + "external/%{toolchain_pkg}%/lib/aarch64-linux-gnu", + "-L", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/lib", + "-L", + "external/%{toolchain_pkg}%/usr/lib/x86_64-linux-gnu", + "--no-canonical-prefixes" + ], + "extra_cxx_compile_flags": [ + "-nostdinc++", + "-isystem", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include/c++/13", + "-isystem", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include/c++/13/aarch64-linux-gnu", + "-isystem", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include/c++/13/backward", + "-nostdinc", + "-isystem", + "external/%{toolchain_pkg}%/usr/lib/gcc-cross/aarch64-linux-gnu/13/include", + "-isystem", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include", + "-L", + "external/%{toolchain_pkg}%/lib/aarch64-linux-gnu", + "-L", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/lib", + "-L", + "external/%{toolchain_pkg}%/usr/lib/x86_64-linux-gnu", + "--no-canonical-prefixes" + ], + "extra_known_features": [], + "extra_enabled_features": [], + "extra_link_flags": [ + "-B", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/bin", + "-L", + "external/%{toolchain_pkg}%/lib/aarch64-linux-gnu", + "-L", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/lib", + "-L", + "external/%{toolchain_pkg}%/usr/lib/x86_64-linux-gnu", + "-lm", + "-ldl", + "-lrt", + "-static-libstdc++", + "-static-libgcc", + "-static", + "--no-canonical-prefixes" + ], + "license_info_variable": "", + "license_info_value": "", + "license_path": "/opt/score_qnx/license/licenses", + "sdk_version": "0.1.0", + "sdp_version": "", + "tc_compiler_library_search_paths": [ + "external/%{toolchain_pkg}%/usr/lib/x86_64-linux-gnu", + "external/%{toolchain_pkg}%/lib/x86_64-linux-gnu" + ], + "tc_cpu": "aarch64", + "tc_identifier": "sdk_0.1.0", + "tc_os": "linux", + "tc_pkg_repo": "score_ebclfsa_toolchain_pkg", + "tc_system_toolchain": false, + "tc_runtime_ecosystem": "ebclfsa", + "gcc_version": "", + "cc_toolchain_config": "@@score_bazel_cpp_toolchains+//templates/linux:cc_toolchain_config.bzl.template", + "cc_toolchain_flags": "@@score_bazel_cpp_toolchains+//templates/linux:cc_toolchain_flags.bzl.template", + "use_base_constraints_only": false + } + }, + "score_autosd10_x86_64_toolchain": { + "repoRuleId": "@@score_bazel_cpp_toolchains+//rules:gcc.bzl%gcc_toolchain", + "attributes": { + "extra_compile_flags": [], + "extra_c_compile_flags": [ + "-nostdinc", + "-isystem", + "external/%{toolchain_pkg}%/usr/lib/gcc/x86_64-redhat-linux/14/include", + "-isystem", + "external/%{toolchain_pkg}%/usr/include" + ], + "extra_cxx_compile_flags": [ + "-nostdinc++", + "-isystem", + "external/%{toolchain_pkg}%/usr/include/c++/14", + "-isystem", + "external/%{toolchain_pkg}%/usr/include/c++/14/x86_64-redhat-linux", + "-isystem", + "external/%{toolchain_pkg}%/usr/include/c++/14/backward", + "-nostdinc", + "-isystem", + "external/%{toolchain_pkg}%/usr/lib/gcc/x86_64-redhat-linux/14/include", + "-isystem", + "external/%{toolchain_pkg}%/usr/include" + ], + "extra_known_features": [], + "extra_enabled_features": [], + "extra_link_flags": [ + "-B", + "external/%{toolchain_pkg}%/usr/bin", + "-L", + "external/%{toolchain_pkg}%/lib64", + "-L", + "external/%{toolchain_pkg}%/lib", + "-L", + "external/%{toolchain_pkg}%/usr/lib/gcc/x86_64-redhat-linux/14", + "-L", + "external/%{toolchain_pkg}%/usr/lib64", + "-L", + "external/%{toolchain_pkg}%/usr/lib", + "-lm", + "-ldl", + "-lrt", + "-lstdc++" + ], + "license_info_variable": "", + "license_info_value": "", + "license_path": "/opt/score_qnx/license/licenses", + "sdk_version": "", + "sdp_version": "", + "tc_compiler_library_search_paths": [], + "tc_cpu": "x86_64", + "tc_identifier": "", + "tc_os": "linux", + "tc_pkg_repo": "score_autosd10_x86_64_toolchain_pkg", + "tc_system_toolchain": false, + "tc_runtime_ecosystem": "autosd10", + "gcc_version": "", + "cc_toolchain_config": "@@score_bazel_cpp_toolchains+//templates/linux:cc_toolchain_config.bzl.template", + "cc_toolchain_flags": "@@score_bazel_cpp_toolchains+//templates/linux:cc_toolchain_flags.bzl.template", + "use_base_constraints_only": false + } + }, + "score_autosd10_aarch64_toolchain": { + "repoRuleId": "@@score_bazel_cpp_toolchains+//rules:gcc.bzl%gcc_toolchain", + "attributes": { + "extra_compile_flags": [], + "extra_c_compile_flags": [ + "-nostdinc", + "-isystem", + "external/%{toolchain_pkg}%/usr/lib/gcc/aarch64-redhat-linux/14/include", + "-isystem", + "external/%{toolchain_pkg}%/usr/include" + ], + "extra_cxx_compile_flags": [ + "-nostdinc++", + "-isystem", + "external/%{toolchain_pkg}%/usr/include/c++/14", + "-isystem", + "external/%{toolchain_pkg}%/usr/include/c++/14/aarch64-redhat-linux", + "-isystem", + "external/%{toolchain_pkg}%/usr/include/c++/14/backward", + "-nostdinc", + "-isystem", + "external/%{toolchain_pkg}%/usr/lib/gcc/aarch64-redhat-linux/14/include", + "-isystem", + "external/%{toolchain_pkg}%/usr/include" + ], + "extra_known_features": [], + "extra_enabled_features": [], + "extra_link_flags": [ + "-B", + "external/%{toolchain_pkg}%/usr/bin", + "-L", + "external/%{toolchain_pkg}%/lib64", + "-L", + "external/%{toolchain_pkg}%/lib", + "-L", + "external/%{toolchain_pkg}%/usr/lib/gcc/aarch64-redhat-linux/14", + "-L", + "external/%{toolchain_pkg}%/usr/lib64", + "-L", + "external/%{toolchain_pkg}%/usr/lib", + "-lm", + "-ldl", + "-lrt", + "-lstdc++" + ], + "license_info_variable": "", + "license_info_value": "", + "license_path": "/opt/score_qnx/license/licenses", + "sdk_version": "", + "sdp_version": "", + "tc_compiler_library_search_paths": [], + "tc_cpu": "aarch64", + "tc_identifier": "", + "tc_os": "linux", + "tc_pkg_repo": "score_autosd10_aarch64_toolchain_pkg", + "tc_system_toolchain": false, + "tc_runtime_ecosystem": "autosd10", + "gcc_version": "", + "cc_toolchain_config": "@@score_bazel_cpp_toolchains+//templates/linux:cc_toolchain_config.bzl.template", + "cc_toolchain_flags": "@@score_bazel_cpp_toolchains+//templates/linux:cc_toolchain_flags.bzl.template", + "use_base_constraints_only": false + } + }, + "score_qcc_aarch64_toolchain": { "repoRuleId": "@@score_bazel_cpp_toolchains+//rules:gcc.bzl%gcc_toolchain", "attributes": { "extra_compile_flags": [], @@ -11250,10 +11488,10 @@ "sdk_version": "", "sdp_version": "8.0.4", "tc_compiler_library_search_paths": [], - "tc_cpu": "x86_64", + "tc_cpu": "aarch64", "tc_identifier": "sdp_8.0.0", "tc_os": "qnx", - "tc_pkg_repo": "score_qcc_x86_64_toolchain_pkg", + "tc_pkg_repo": "score_qcc_aarch64_toolchain_pkg", "tc_system_toolchain": false, "tc_runtime_ecosystem": "", "gcc_version": "12.2.0", @@ -11262,7 +11500,7 @@ "use_base_constraints_only": false } }, - "score_qcc_aarch64_toolchain": { + "score_qcc_x86_64_toolchain": { "repoRuleId": "@@score_bazel_cpp_toolchains+//rules:gcc.bzl%gcc_toolchain", "attributes": { "extra_compile_flags": [], @@ -11277,10 +11515,10 @@ "sdk_version": "", "sdp_version": "8.0.4", "tc_compiler_library_search_paths": [], - "tc_cpu": "aarch64", + "tc_cpu": "x86_64", "tc_identifier": "sdp_8.0.0", "tc_os": "qnx", - "tc_pkg_repo": "score_qcc_aarch64_toolchain_pkg", + "tc_pkg_repo": "score_qcc_x86_64_toolchain_pkg", "tc_system_toolchain": false, "tc_runtime_ecosystem": "", "gcc_version": "12.2.0", @@ -11312,7 +11550,7 @@ "@@score_rules_imagefs+//extensions:imagefs.bzl%imagefs": { "general": { "bzlTransitiveDigest": "4qMGnB7+T2rXYxW5iSvXX6nlCv/jNBvR6B0r5AHvEQQ=", - "usagesDigest": "GgFOQ+Q22kkOU/ZCqKRDx1LjqJK+2t092mFT4W/TzDE=", + "usagesDigest": "5RHyuTguOO5ClbTqetWbKGOLz2oTFtUGQ12jrxMFTRk=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, "envVariables": {}, @@ -11323,7 +11561,7 @@ "tc_cpu": "x86_64", "tc_os": "qnx", "tc_pkg_repo": "'@@score_bazel_cpp_toolchains++gcc+score_qcc_x86_64_toolchain_pkg'", - "sdp_version": "8.0.0", + "sdp_version": "8.0.4", "tc_type": "ifs" } }, @@ -11333,7 +11571,7 @@ "tc_cpu": "aarch64", "tc_os": "qnx", "tc_pkg_repo": "'@@score_bazel_cpp_toolchains++gcc+score_qcc_aarch64_toolchain_pkg'", - "sdp_version": "8.0.0", + "sdp_version": "8.0.4", "tc_type": "ifs" } } @@ -11441,11 +11679,51 @@ "@@score_toolchains_rust+//extensions:ferrocene_toolchain_ext.bzl%ferrocene_toolchain_ext": { "general": { "bzlTransitiveDigest": "9k8SLwP4ec9xXjFivq0Kn0FradTQhcEA+j/WsLxfVPM=", - "usagesDigest": "ANsCxJ1KIL4fXiEiWcWT5l5bMcnUM7xjtLQrHfOO6G4=", + "usagesDigest": "X5jkmpEZfv82cdnyvwY3mAVAO9wp8SneayNZS50BH7A=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, "envVariables": {}, "generatedRepoSpecs": { + "ferrocene_aarch64_ebclfsa": { + "repoRuleId": "@@score_toolchains_rust+//extensions:ferrocene_toolchain_ext.bzl%ferrocene_toolchain_repo", + "attributes": { + "url": "https://github.com/eclipse-score/ferrocene_toolchain_builder/releases/download/1.0.1/ferrocene-779fbed05ae9e9fe2a04137929d99cc9b3d516fd-aarch64-unknown-linux-gnu.tar.gz", + "sha256": "b1f1eb1146bf595fe1f4a65d5793b7039b37d2cb6d395d1c3100fa7d0377b6c9", + "strip_prefix": "", + "toolchain_name": "rust_ferrocene", + "target_triple": "aarch64-unknown-linux-gnu", + "exec_triple": "x86_64-unknown-linux-gnu", + "staticlib_ext": ".a", + "dylib_ext": ".so", + "binary_ext": "", + "default_edition": "2021", + "stdlib_linkflags": [], + "extra_rustc_flags": [ + "-Clink-arg=-Wl,--no-as-needed", + "-Clink-arg=-lstdc++", + "-Clink-arg=-static-libstdc++", + "-Clink-arg=-static", + "-Clink-arg=-lm", + "-Clink-arg=-lc" + ], + "extra_exec_rustc_flags": [], + "env": {}, + "exec_compatible_with": [ + "@platforms//cpu:x86_64", + "@platforms//os:linux" + ], + "target_compatible_with": [ + "@platforms//cpu:aarch64", + "@platforms//os:linux" + ], + "coverage_tools_url": "https://github.com/eclipse-score/ferrocene_toolchain_builder/releases/download/1.0.1/coverage-tools-779fbed05ae9e9fe2a04137929d99cc9b3d516fd-x86_64-unknown-linux-gnu.tar.gz", + "coverage_tools_sha256": "497958e925bc94833ea226d68f6d5ba38bd890f571c73e230141d2923e30dd94", + "coverage_tools_strip_prefix": "779fbed05ae9e9fe2a04137929d99cc9b3d516fd/x86_64-unknown-linux-gnu", + "miri_sysroot_url": "", + "miri_sysroot_sha256": "", + "miri_sysroot_strip_prefix": "" + } + }, "ferrocene_x86_64_unknown_linux_gnu": { "repoRuleId": "@@score_toolchains_rust+//extensions:ferrocene_toolchain_ext.bzl%ferrocene_toolchain_repo", "attributes": { @@ -11606,7 +11884,7 @@ "@@toolchains_llvm+//toolchain/extensions:distributions.bzl%llvm_distributions": { "general": { "bzlTransitiveDigest": "gCdXpBt3HBBc280OILOFheHmO7lXWXJYnPgYiTtyapI=", - "usagesDigest": "VyKGZSw79ryPJ9gt0sqBfIkA7qGOU6tnlDHd7awkb6Q=", + "usagesDigest": "3B/1Qf38oum/lRpBvi3mnJwV6XMAQF+4//DH0B29rNA=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, "envVariables": {}, diff --git a/quality/coverage/coverage.bazelrc b/quality/coverage/coverage.bazelrc index b606ccb0d5..4a31f91a61 100644 --- a/quality/coverage/coverage.bazelrc +++ b/quality/coverage/coverage.bazelrc @@ -38,11 +38,11 @@ coverage:llvm_cov --experimental_generate_llvm_lcov coverage:llvm_cov --experimental_use_llvm_covmap coverage:llvm_cov --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux -# Register the Ferrocene host/exec Rust toolchain (via toolchain_common). Without +# Register the Ferrocene host/exec Rust toolchain (via _score_common). Without # it, Rust crates built in the exec configuration (e.g. proc-macro deps such as # score_log_fmt) fall back to the rules_rust stable toolchain and fail to compile # nightly-only features. Target-config Rust already resolves to Ferrocene. -coverage:llvm_cov --config=toolchain_common +coverage:llvm_cov --config=_score_common # Clang 22 emits warnings the GCC 12 toolchain does not, and the base build sets # --copt=-Werror. Coverage runs should not fail on those unrelated warnings, so diff --git a/score.bazelrc/score_toolchain.bazelrc b/score.bazelrc/score_toolchain.bazelrc new file mode 100644 index 0000000000..7e68fa33da --- /dev/null +++ b/score.bazelrc/score_toolchain.bazelrc @@ -0,0 +1,51 @@ +# ***************************************************************************** +# Copyright (c) 2026 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 +# ***************************************************************************** + +build:_score_common --cxxopt=-Wno-error=mismatched-new-delete +build:_score_common --host_platform=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix +build:_score_common --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu +build:_score_common --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0 + +build:score-qnx-x86_64 --config=_score_common +build:score-qnx-x86_64 --noexperimental_merged_skyframe_analysis_execution +build:score-qnx-x86_64 --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 +build:score-qnx-x86_64 --incompatible_enable_cc_toolchain_resolution +build:score-qnx-x86_64 --incompatible_strict_action_env +build:score-qnx-x86_64 --sandbox_writable_path=/var/tmp +build:score-qnx-x86_64 --platforms=@score_bazel_platforms//:x86_64-qnx-sdp_8.0.0-posix +build:score-qnx-x86_64 --extra_toolchains=@score_qcc_x86_64_toolchain//:x86_64-qnx-sdp_8.0.0 +build:score-qnx-x86_64 --extra_toolchains=@score_qnx_x86_64_ifs_toolchain//:ifs-x86_64-qnx-sdp_8.0.0 +build:score-qnx-x86_64 --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_pc_nto_qnx800 + +build:score-linux-x86_64 --config=_score_common +build:score-linux-x86_64 --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0 +build:score-linux-x86_64 --platforms=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix + +build:score-linux-aarch64 --config=_score_common +build:score-linux-aarch64 --extra_toolchains=@score_gcc_aarch64_toolchain//:aarch64-linux-gcc_12.2.0 +build:score-linux-aarch64 --platforms=@score_bazel_platforms//:aarch64-linux-gcc_12.2.0-posix + +build:score-eb-aarch64 --config=_score_common +build:score-eb-aarch64 --extra_toolchains=@score_ebclfsa_toolchain//:aarch64-linux-sdk_0.1.0-ebclfsa +build:score-eb-aarch64 --extra_toolchains=@ferrocene_aarch64_ebclfsa//:rust_ferrocene_toolchain +build:score-eb-aarch64 --platforms=@score_bazel_platforms//:aarch64-linux-sdk_0.1.0-ebclfsa + +build:score-autosd-x86_64 --config=_score_common +build:score-autosd-x86_64 --force_pic +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 +build:score-autosd-aarch64 --platforms=@score_bazel_platforms//:aarch64-linux-autosd10 +build:score-autosd-aarch64 --extra_toolchains=@score_autosd10_aarch64_toolchain//:aarch64-linux-autosd10 +build:score-autosd-aarch64 --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_aarch64_unknown_linux_gnu diff --git a/tests/utils/test_helper/test_helper.hpp b/tests/utils/test_helper/test_helper.hpp index 82c9429469..6d105c959c 100644 --- a/tests/utils/test_helper/test_helper.hpp +++ b/tests/utils/test_helper/test_helper.hpp @@ -173,6 +173,7 @@ class TestRunner int RunTests() { ::testing::GTEST_FLAG(output) = "xml:" + xmlPath(m_test_path); + ::testing::GTEST_FLAG(brief) = true; testing::InitGoogleTest(); auto res = RUN_ALL_TESTS();